So, I guess we all need to develop a 'family-centered' philosophy or life more than a 'work-centered'. I find this rather compelling, albeit difficult to tackle (because it is likely you spend more 'conscious' time at job than with your family).
So, as you say, it is a problem of a fine-tuning of one's own values.
Not that I am suggesting 'crap jobs' are good for anyone. But that one has to value 'family success' much more than 'job success'.
And honestly, does any of this sound unique to programming? Do you think carpenters are all happy just making what people will buy from them? Do you think musicians all just want to make music people will buy? Mathematicians of old just being glad they could reliably hit ships with a cannon? Electricians constantly just plugging in similar wirings into similarly bad houses? ...
An anecdote to highlight your point.
I'm a web developer, but I've built furniture four our new house last year. It was fun, I've learned some new things and, most importantly, it's still there once the electricity goes out. It provides, in my opinion, a lot more value than nth iteration of some corporate website re-design. I thought in a parallel universe I could become a carpenter and live a great life. Then I've imagined the parallel universe in which a frustrated carpenter dealing daily with stupid client demands, building the same table over and over again, physically tired and risking dismemberment on a daily basis, comes home. He wants to make him a website to reach to more clients, so he picks up HTML and CSS and Wordpress, builds it and it's fun, it works, you can interact with this creation from anywhere in the world! He goes to sleep thinking "I should've become a programmer instead...".
I think about quitting every single day, but this fear lets me grind through the day. Being unemployed is just no option if you're not alone/have family.
It's not that I do a job in a field that I hate. I have a crappy job in a field that I love. I'm convinced I could resign much more easily if it were the former case..
I will admit the job I had wasn't nearly as dreary, but I was still plagued by the fact that what I was doing was utterly pointless and had zero value.
In retrospect, I wish I had just grown the fuck up and accepted the simple fact that the chances of any person on this earth making his or her life meaningful outside of his or her own family are astronomically slim. The machine we contribute to is one that takes in money, spits out more money, and creates very little value in the process.