You start a new job, or are at an existing job, and management tells you your hours are 9AM-5PM. So you get in at 9AM every day, and leave at 5PM every day.
This is not what you want to, and nobody likes a clock-watcher.
If your hours are 9AM-5PM then you should start working at 100% by 9AM.
So your day starts at 8:30AM, or 8:45AM – whatever works best for you – and that is when you aim to arrive for. This serves a couple of purposes. Firstly, it gives you a buffer in case of commuting delays (in NYC I always plan for these). And secondly, assuming no delays, you can get a jump on the day.
I notice a huge difference in my productivity when I have a half hour to settle down, switch from personal to work contexts, organize my thoughts, organize any email that came in overnight, and prioritize my pending tasks.
This compared to mornings when I get in around 9AM and I have to manage incoming work along with organizing my day and outstanding tasks and overnight email, let alone transitioning from personal to work contexts.
Similarly if your hours are 9AM-5PM, you should keep working at 100% until 5PM. If you are wrapping up so you can leave at 5PM then you aren’t working your full shift; you are slowing down and wrapping up before 5PM. So your day ends around 5:10PM or 5:15PM.
Working the full shift you are being paid to work is part of being a professional; part of being an adult.
If you find yourself in this position and do not agree, then perhaps it is time to find a new job with more acceptable work day schedule.