That's why there's such a hard pushback on work from home. The economy MUST have slaves in the cities or it will collapse. If they aren't chained to a desk from 8-6 then they don't have to go to storage at midnight.
I've worked remotely most of my career (full time now, partly before) for various companies and there has always been a negative perspective on working from home even among tech companies (with a few exceptions). The attitudes you see now towards it are just reversions back to pre-COVID philosophies and they aren't necessarily wrong about some of it.
Prior to COVID, I'd heard the same excuses why people wouldn't be allowed to work remotely: "We need a company culture", "We don't feel like most people are productive at home", "people need to be in the office", "we don't want to be a remote company", "people collaborate better", and my personal (sarcastic) favorite: "If I let xyz do it, I have to let others do it".
It's always been viewed negatively especially by older generations, people who view working from home as not really working or people slacking off. IMO it's the difference in being productive vs present. I interviewed at a company years ago and I have adopted their hiring philosophy ever since: if I can't trust you to work from home, I can't trust you to work in the office. I've had plenty of coworkers/employees over the years who were inept and did nothing despite being forced in the office every day. The problem is that at a high level (VP, Cxx), they don't always see this and assume being in the office equates to productivity, but it doesn't for everyone. It also sometimes comes down to having an empty office, they don't like showing up to no one being there.
Despite all of this, at least in my industry, there are more chances to work remotely than there were before COVID. I think the push you see now is from large companies forcing thousands of employees back very publicly is partially fake, since they've been transitioning that way for over a year now, and partially because of previous reasons I mentioned.
Unfortunately some of the trending back to the office the last year or so signals to me that the message they received was that wfh was less productive, rather than it works really well for some people compared to others and people should have the option if it works for them. Regardless, getting people into town has nothing to do with it, this is the same view that was held prior to COVID and some managers see the great experiment during COVID as reinforcing previously held beliefs.