Well obviously schools have existed in any part of society. But schools have always had a purpose - whether it's training future scholars at madrasas, training sons of nobility for war, etc.
The institutionalized mass factory-farmed education system was a direct result of western Christian imperialism and the desire to enforce and spread biblical teachings.