The nice things about academia are that if you're not on the tenure track, you don't have to spin your wheels trying to publish or perish, you get to meet and talk to a lot of intelligent people outside of your field, and they often have a decent work-life balance. The downsides are that you're not going to be working with the newest tech, people sometimes poo poo what you do/there are a lot of status games, and it's SLOW.
It does not satisfy my programming itch, but I prefer for my tech projects to be on my own time and for play.
I vaguely remember hearing that it's actually illegal for your boss to deny this without some good reason, but I suppose it might not be that hard to come up with some excuse either.
Sometimes jobs have a minimum number of hours per week posted, but most of the time it's simply part of the benefits negotiation. Paid days off per year, public transport pass, salary amount, how many hours per week, IP of any open source projects I work on, it's just part of what I talk about when negotiating my contract. And it doesn't have to be at the beginning of your employment.