Turning a military building into a girl's school, and then having this school right next to other military buildings - is this something that happens often? Or were there ulterior motives behind it?

Yes, the US has 160 schools on military bases:

https://www.militaryonesource.mil/education-employment/for-c...

Yeah man. Who's ever heard of a military base with a school on, or near it besides every military officer with a family ever?