The problem is that the soldier parents want their kids to live with them on the base. The alternative is they have their kids live in an orphanage somewhere else until they decide to retire, or soldiers just aren't allowed to have kids at all. Neither is very realistic, so there are schools on bases.