9-to-5 here is figurative. No one is tracking hours for software engineers at most companies. It just means: you start working in the morning, and you stop working in the evening. As opposed to working until late at night and/or weekends.
I understand that. 9-to-5 is a common term, but I wonder why - many mention clocking out at 5, does that mean they arrive at 8 in the morning? Or maybe some have lunch on the keyboard while continue working.
In my last two jobs, one in the Bay Area and one in Vancouver, my usual schedule has been arrive at 9, take a 45-60min lunch, leave at 5 and I've never had anyone tell me I'm not working enough or producing enough output.
In the Bay Area I’ve always rolled in around 11 and left around 5. Maybe 6 if I really need to get something done. When I worked for a remote company I did maybe 20-25 hours most weeks. Everyone’s always been very happy with my work. I’ve gotten offers for seed funding from founders in exit interviews. Penny pinching your hours is a cargo cult.
Bay Area here. No real hours however "business hours" are 9 to 5, that generally means any meetings need to be within that time frame (ideally actually more like 10 to 4). It is common courtesy to also not schedule 12-1 for lunch, but that gets thrown out the window a lot and so working lunches are the norm. Even if I don't work through lunch, I usually only take 20 min or so.
Most people are in the office (when they are actually in the office, which isn't often these days), from 9ish to 5ish. I've worked at many companies that offered dinner at 7 to encourage people to stay late, but that only seems to have the effect of having people start later. No one really tracks hours as long as the work is getting done. Plenty of time I'll cut out of work around 2pm for something and then check in later in the evening for a couple hours.
General trend is people in their 20s work longer and later. Most people over 30 at any tech company I've worked at are out the door before 5. But also people over 30 tend to more reliably be in the office at or before 9.
I live in a Southern European country where the standard for office work is 9-18 with a one hour break starting between 12:30 and 13:30. On my last job as employee we were more flexible. I was starting at 10 maybe with even a 90 minutes break but I was usually in office until 19 or 20, which was OK because traffic was insane before then.
It refers to "being at work", not "actively heads-down working on something".
If you come in at 9am, do work, have lunch, make coffee, work more, suffer meetings, work, chat at the water cooler, work again, and leave at 5pm, you're working 9-5.
Software engineers are usually not tracked hourly. There are common exceptions such work done for government programs, or contracting. Even in these scenarios, hours are not usually tracked by any authoritative system. In the end, the only feedback you get is based on softer metrics like availability during business hours, or on time completion of work.
In my experience, lots of engineers will show up far after 9 AM and leave well before they have reached a full day of work. Its a very privileged system that exists because it is so hard to hire engineers. At least for now.