I do great work remotely and I just wear my pajamas all day, and work sometimes at 7am, sometimes at 7pm, sometimes at 10pm (honestly depends on my token usage). I'm comfortable and I'm effective, what else could you ask for?
There are many folks way more talented than me who would never work a government job because of silly reasons like that. And it's like... Why?
Dressing up every day makes you feel great. I recommend it to everyone.
I had a job where dress clothes were expected and I miss it dearly.
My point is that the concept of work has changed so much yet we're still bound by the 9-5 rules. Core hours during which teammates must all be available makes sense, but absent that, it's all just arbitrary and cultural.