Safety laws are fine, we're talking about a person saying they enjoyed a late night coding session.
If you enjoy your work, that’s great, just do your work during work hours, don’t use your free time to undervalue other workers in the industry.
Yes, shit companies exist and abuse their employees. You quit and move on. There's no indication that this was happening.
Like you said, if you work for a company which expects this from you, and you quit as a result, they can simply hire someone else that takes the abuse, and that is not a good prospects for us workers in this industry. Which is the reason I’m asking OP not to do this. Even though they had fun and were handsomely compensated, this behavior does a net disservice for the rest of us.