I think your leading sentence is a false Dichotomy for many people. Pursuit of happiness doesn't imply being in a state of bliss all the time. Stoics are allowed to be happy too.
> Pursuit of happiness doesn't imply being in a state of bliss all the time.
Sure, correcting "pursuit of happiness" to "pursuit of contentment/fulfillment/purpose" is pedantic, but it makes me happy ;p
It's also a connotative reminder to ourselves & others to seek rewards with longer time horizons
Writing code is also working with your hands. It produces real world effects which even if you cannot observe them directly still provide societal benefit: The "impact" of this can in many cases be much larger than a manual job.