I feel like this is true for so many jobs these days. Like I think that a lot of people (in high skill jobs) are really not good enough for their jobs. But we simply don't have enough good people for all the jobs.
Just as a programmer, so many people that are paid to do it are... bad. Managers, same. PMs (I think) same. I wouldn't be surprised if others in other professions feel the same.
There are remarkably few people who are just born as talented managers, probably the same number that are just naturally talented developers. All of the best managers I've had have all had some level of management training. Some got training while I worked on their teams and the improvement from no training to just a few months of training is pretty remarkably.
Well managed companies don't care where you work, it simply doesn't matter. The problem is that management is a lot harder than many thought, but you could sort of hide the fact that you're bad at it when everyone is at the office. There simply isn't enough talented managers around. We're not solving that by requiring everyone to return to the office, the terrible managers are still terrible.
If anything companies could use this opportunity to identify people with poor management skills. If a team under-performed during the work-from-home period, then it's probably time get their manager some training.