There is nothing that will pull me out of 'the zone' quicker then hearing distractions in the office. People talking, laughing, standing in front of your desk talking about shit that has nothing to do with you.
I would often go work IN THE SERVER ROOM, just to get away from the noise and distractions that existed in the office. [Open Office layouts need to be destroyed]
So WFH means I get 2 more hours a day of ME time. I sleep in later. I have more freedom of WHEN I work. If I get a flash of inspiration to solve a problem at 1am, I can jump in and fix it.
Being able to lean back and ask my co-worker: "Hey Bob, what was thing called in NGinx that we used last week?" is much less formal then trying to articulate in a slack/teams message.
BUT, I hated being interrupted by others asking things like "..what was thing called in NGinx that we used last week?" when I could have just been asked in Teams/Slack.
So to simplify these points; If you are pro-social: WFO is better If you are anti-social: WFH is better