Some/all of that have less to do with war and more to do with general disaster preparedness.
* Bomb shelters provide shelter from...bombs, yeah
* Windowless hallways provide shelter from tornadoes (no glass to break/become shrapnel)
* The heavy metal doors are firewalls that automatically close when the alarm goes off (most are hollow, won't do shit against assault weapons and predate even Columbine)
I suppose you could put windows between the classrooms and hallways, but those have their own associated problems to overcome: increased noise, more windows for students to break, safety in emergency situations, etc.
As for non-connected classrooms, where you need to walk outside to go between rooms, I've always thought that was to solve the same problems. Cheaper to build/renovate/modify/expand, easier to clean, less noise and fewer students running into each other.
It's not just american schools. All schools resemble prisons because all school systems around the world essentially adopted the american model which borrowed heavily from the prussian model.
All schools were compulsory indoctrination centers which buttressed the burgeoning nation-states.
https://en.wikipedia.org/wiki/Prussian_education_system
Modern education system, along with national media, government, etc are pillars of the nation-state. You can't have a nation-state without one nowadays.