This sentiment is typical of the general HN population - a disconnect on the average person. What job wouldn't fire you for leaving in the middle of the day? Most likely a job where OP has a lot of freedom, trust, and respect - something that isn't readily available everywhere else.
On the flip side I think a lot of people are just scared to push the boundaries.
If you have a manager who values you you'll often find you can get away with a lot more than you expect as long as you are still a strong benefit to the team.
It's not a thing in big faceless corporations, chains, etc, for example (though it can be a thing in places like Google, MS, etc, with the right manager).
But on small businesses (e.g. 2-20 people) it's not uncommon in certain countries (thinking of Southern Europe that I know of) to have an understanding when one needs to leave. There are also practices like "siesta" where places close for a few hours altogether and people have lunch etc.
I was also surprised to see the hours kept in french towns (not Paris, smaller, but still big ones) that e.g. shops opened casually at around 10am, many were closed at lunchtime, and reopened again later, etc.
I'm pretty sure this is the case elsewhere without the "protestant work ethic" (or Japan's version of the same, instilled after lots of humiliating defeats on the hands of the west), e.g. Africa, Latin America, and so on.
Completely agree, and maybe we should strive for it. Lunch breaks, smoking breaks etc are already a thing. Employers let certain employees leave early to go take their kids to the doctor or etc.
But the reality is that most employers are far less friendly, to their own detriment of course... but only in the long term.
I've just started my first developer job, and my team has the freedom to come and go when they please. As long as we put in the 36 hours a week, it's all good.
Sounds amazing, not even 40 hours! Not everyone has that luck. I've been in shops that required 8 - 6 since your lunch hour doesn't count. I've also been in shops where I WFH and have 40 hours requirement but no oversight in how I use it. It all depends on where you work - but I'd argue the average is not as friendly as yours.