I think the second picture is what used to be a shopping center and hotel. It was made of wood. So were most of the houses (almost the universal construction material for American homes). Wood burns.
Nursing homes, schools, hospitals, medical manufacturing facilities, pharmacies, etc. must be made of steel and concrete. Fire and mold are the primary reasons.
Not that the kids would not have died in their school; the smoke would probably get them. But at least they were in a building that would not burn and they were right beside the ocean where they could escape.
So why send kids to homes that are inherently flammable when the school building is not? That makes no sense.
Schools are not required to be steel.
Huge percentage of school classrooms are in manufactured portable buildings made of wood.
The reason they can be vulnerable to fire is because the hvae fire alarms, easy egress, and lots of playground space away from the buildings for evacuation.