I sometimes do, because if I'm in the flow if a piece of work, then I might just finish it rather than go home. Other times, if I have something I need to be back for, I leave. But mostly we're pretty flexible, and as long as you do your hours, the exact start and finish times don't matter.
I'm in tech, and sometimes we do have to do out of hours work, but you can claim that back as TOIL, or sometimes overtime. We also have an on-call rota, but there's extra pay for that. If we have a major outage, then it's all hands on deck, but hardware and so on is much more resilient these days, so it doesn't happen that often.
I grew up on a farm. Cattle have to be fed and milked every day, but they don't always have calves at reasonable times of day. If they get out in the middle of the night, then anyone available helps out in getting them back safe. And during harvest, you work with the weather and do long days to get everything in. But other times, there can be less to do, so it probably balances. I think it gave me a clear sense of priorities about what work needs doing now, and what can be left till tomorrow, and I am pretty good at time management.