I think you are asking a very important and useful question, and one which seems like it
could be a significant part of the conversation about climate change too...
I think we know roughly why K-12 schools are like they are -- teachers didn't know how to use computers much at all in the 90s when I was a kid and it's a running gag that they never really understood them. Now they do, so it's a new option that I think it's fair to recognize truly is new.
I do work in education and spent a ton of time figuring out how to make video lectures for instructors in the department that were effective, and tons of new online teaching tools were tested that there was never a huge push to play with before.
I don't think it's malice, it's simply that those professors have been doing it one way for 30 years and asking them to learn to do it a whole new way is a big ask. They have to spend all their time writing grants and other bureaucracy, mentoring students, and from personal experience I think it's fair to say that there is little appetite for changing everything to something no one knows how to judge the quality of due to lack of experience in an active classroom. It is the software equivalent of pushing a change straight to a live server, except in this case if you screw it up and do a bad job you're impacting the quality of education being provided to at least dozens of students who deserve better. It's really hard to just in-place make a change without the ability to actually test it.
I hope more people get something closer to your experience, I think the last few years have pushed a lot of people on that education side into a much more open mindset now that online classes are less risky. I think it does serve a purpose to have high school kids in person because of social things and the reality that a group of 20 kids will on average do a better job of finishing stuff they aren't really excited to do whereas one kid remotely is more likely to slip through the cracks. There's also issues with equity when internet and computers and space to learn aren't uniformly available.
But I think you're asking the right question. Let's get cars off roads and turn these stupid commercial parks into residential areas please, we need more affordable housing, not redundant space for people to work in when they're not at home... and the climate control for these giant unnecessary buildings... heck, the parking lots alone are a huge net negative especially if you account for the reality that many many fewer people really need to visit those buildings on any given day.