That doesn't seem to be the case at all, in my experience. In fact, out of all the white collar industries my friends and I are involved in, tech makes a healthy lifestyle the easiest by a loooongshot. This is part of a cultural feedback loop that also involves people's habits: probably 95% of the tech workers I know regularly exercise and are opinionated about their diet.
This may be a regional thing though; I live in the second fittest city in the country.
A lot of people who go in there and want to eat a single Extra Long Cheeseburger are going to see that and say "No freaking way am I paying $3.99 for one, when I can get TWO for $5". We have a natural tendency to compare per unit pricing, and see it as buying just one means paying $3.99 per unit, but going for the 2 for $5 means just $2.50 unit, and we tend to see the regular price as a rip-off compared to the sale price.
Yes, this is not rational, but this is how people work.
Similar thing with Subway, which ran a deal where most foot long subs were $6 all February. That made it real hard for many people who normally bought a 6" to do so. When your normal 6" is $5.89, and you can double the size for an extra $0.11, it is very very hard to stay at 6".
Another good illustration was an experiment I saw. The experimenters got to play with the pricing and availability of drinks in a movie theater. The theater normally sold a small drink for something like $1, and a large for something like $3. The large was much larger than the small, but the small (which was still kind of big) was by far the best seller. So then they added a medium, that was about 25% of the way between the small and large in size, but cost something like $2.75.
Note that objectively the medium is a terrible choice. It cost 2.75 times as much as the small for only 25% of the soda, and it only cost $0.25 less than the large but gave much less soda.
So guess what happened? No, people did not buy the medium...but now most people bought the large!
I'm not sure exactly where I saw this one. I think it might have been on the National Geographic channel, on the show "Brain Games". If not, it was on a similar show on the Science Channel or one of the other Discovery network channels.
Psychologists and behavioral economists have learned a lot about how we make purchasing decisions, and the marketing departments of probably every major (and a lot of minor) food companies follow that work closely and put it into practice. Most of us don't have a chance against that.
I know it is just a kids movie, but the world in Wall-E a Disney movie from 2008, is terrifyingly realistic now, and I thought it was at least sort of a joke.(For anyone not familiar, Wall-E is an animated movie portraying a "kid friendly" dystopian future where the humans are all really fat, can barely move, have abandoned earth for a space station, and robots do everything for them. They have hovering chairs and perform no physical exercise and earth is basically a wasteland full of trash. The protagonist is a trash collecting robot on earth that accidentally brings a plant, of which there previously were none, onto the spaceship the humans live on causing the plot to drive forward)
I now think the autonomous car, ultra marketed, consumer society we are building actually ends up very close to this.
There is, but most people don't understand how it works. According to recent neurological studies, it's a lot like a muscle. In the long term, you exercise it and it gets stronger. In the short term - and this is the important part - it can become depleted. If your work requires a lot of will power (including focus, discipline, initiative) then you'll have little left for other parts of your life.
This is really what I think a lot of people mean when they say they come home tired. They're not physically tired, they're not low on energy, but they are low on will. Therefore they tend to settle for the easy or familiar, such as watching Netflix instead of exercising or eating junk instead of cooking real food. I can often feel the pull myself, but the fact that I understand and recognize what's happening helps me resist/manage it.
We obviously aren't just subject to the whims of our environment, we make choices and can decide things, but after a lot of reading on AI / neuroscience, and just being alive longer I am becoming convinced the environment and your perception of it is the single biggest factor. It goes beyond happiness toward fundamental outlook and beliefs.
I would argue that you have done that trickery of your mind I mentioned. Self awareness, recognition of meta-thought patterns, alignment of other systems in your brain with your "ego" or consciousness. Those tools let you make choices that are theoretically not possible if your will is entirely depleted and you are subject to the whims of lower level systems. It is in this area where radicalizing life style, having big goals and ideas that excite you and, say, require physical health, or really learning deeply on some topic, can pull you through. You have tricked or overridden those underlying systems that would push you towards a lazy or consumptive habit towards a more generative habit. The big goal may require high degree of physical health, or deep knowledge on some topic. It really helps to be able to achieve it in small, observable chunks (getting a little fitter every day/week, learning a little more, etc.).
There is clearly something to the whole ego depletion concept, it is, at least, a helpful mental model to observe the act of becoming mentally tired and acknowledge it. I really do believe in decision fatigue. I have tried to (radically) cut decisions out of my life (what to wear, etc.). So that I can make decisions about the most important things, my work goals, family goals, big picture stuff. Despite ego depletion being a tricky mental model, it is obvious everyone gets tired. Most good developers, even after years of consistent hacking will still only have 3-6 deep hours in them on any given day. That's it. Only (rather extreme, IMO) outliers can, say, code intense for 12 hours with the same quality of the first few. Most of us require sleep, mental digestion, and problems get solved somewhere in the depths of our mind outside of the view of our consciousness. Then we return and the problem is solved in the shower or in flashes of "insight" (which would just be whatever system in your brain finally getting the message through to your consciousness... the pieces finally got connected).
How does this happen? We have no will, yet in our sleep our brain is clearing out memories and getting our systems tuned up for the next go. Is this "actual" thinking? Or is it really the equivalent of compacting a database so that the higher level systems can now just see more clearly? It is super complex. There are so many questions about the way deep thinking and problem solving works, how we create things that we set out to create, overcoming obstacles. Ego depletion is like a local maxima or tactical part of the bigger picture of getting what you want and building / solving.
So what is will power? Is there ego that we deplete? I don't know, but I know straight up higher level conscious thinking about every decision to achieve a desired outcome are practically impossible for most people. That means other systems and processes work as the primary agents of change in our lives, and willpower is at best a passenger giving you advice and helping you out once in a while.
At a high level I radicalized my life style. I have ups and downs, but I be and a runner and a lifter and I have run hundreds of miles e every year since. It was complete and sort of stark, but I endured.
My theory as to why people fail -- There is no such thing as will power. Everyone thinks there is and that they aren't strong enough and that is why they failed. I think in the very short term there is will power. Hours for most. Once your higher level thinking is overrun you lose.
My hand wavy theory based on my experience and knowledge; you have to believe in something with enough intensity that your brain you can't talk to gets on board and accepts its reality. You have to fight it and use tricks to move around out of sight to where the higher level you gets what it wants. This is not a linear path.