The US has been doing unanounced bombing in Iran for decades now. However, this was the first one I'm aware of that had such a wide breadth of targets. Afaik, past targets were generally nuclear sites, air defense installations, high level personell. I believe this was only the second time the US has bombed them during active negotiations.
Having a school near or in a military base is not unreasonable. Those that serve on the base often live in or near the base and may have children who should be able to go to school near where they live.
Using a surplus former military building for a school is reasonable too; building new buildings has a cost, and reusing an excess building is good stewardship.
The attacks on Iran began at 9:45 am and the school was first attacked at 11:22 am. It takes time for leadership to understand the situation and issue evacuation orders, and it takes time for evacuation orders to be followed. It seems the onsite school leadership had decided at 11 am to leave, but like I said, it takes time to communicate with parents and have children picked up, etc.