Someone could be extremely active outside of work - its not just work that counts.
Edit: Even in the software world - what about all of the people who create stuff outside of formal "work"?
What about achieving happiness and self-fulfillment from other things than work? I couldn't care less about my (well paid & successful) corporate job, because after it ends, I put on harness and helmet and go climbing. Or on the weekends hiking, skiing, ski touring, paragliding, diving, and so on. Traveling around the world for vacations. I have a great wife, I have a tiny little son I love very much. Those are properly fulfilling things in life, very well worth investing one's time and energy. Plenty comes back, and even if not, its a great thing to do nevertheless.
At work, there are plenty of folks with mindset you describe. Investing themselves into corporate careers, thinking money, talking money. Most I know have pretty sad lives.
A lot easier to find joy in your work these days vs. activities and vacations too...
As they say, 'whatever makes you happy'. Just consider long term happiness, and not only momentary kick.
I think you're missing the key part here. Most tech workers do have some ownership in the companies which muddies the calculus a little bit. But if you don't have a stake in the company you are literally trading time for money. Work more time for the same money and you're just under-pricing your labor by an equivalent amount.
Also, if you need to work overtime to get good recommendations and promotions that is not a company you want to spend your time at.
Also also, if you need to work overtime to care about the work you're doing then you should re-examine your value system.
"Just show up, do the bare minimum to meet expectations, finish your 8 hour shift and go home and enjoy quality time with your family."
It's possible to opt out of the bullshit conspicuous overwork that a lot of people engage in (although you should be prepared to face consequences for that!), and still do more than the bare minimum during the 40 hours you show up to work. And it may be better _for you_ to do so.
Maybe nitpicking, but I don't think this is true at all. Lots of tech workers do, sure, but I doubt it's anywhere even close to half of them.
I think a better way to look at it is -- don't be loyal to something that can't be loyal to you. But you can and should let yourself care about the work you're doing and the individuals you're working with. That way, if you do end up leaving when you don't want to, you have accomplishments and a network of people who know what you're capable of. And up until then, you can take pride in what you're doing and feel good about how you're treating the people you're doing it with.