Brett Venoitte and John Taylor Gatto covered this long ago: the schooling system was invented by Prussian Proto Nazis to get their slaves to run into gun fire and obediently work in factories
Then that got exported to the rest of the world and customized most notably by Horace Mann in the United States.
White label indoctrination and fascism.
School Sucks podcast is all you need