I heard a claim recently that one of the main reasons behind the establishing of public schools in the US was to actively keep children out of the workforce, so they wouldn't compete with adult labour (particularly as industrialization was reducing the workforce in some areas).
I imagine if there is any truth to this, it would have been focused on urban areas. Were there any large scale protests or movements from farmers against mandatory schooling, as it would keep children away from the farms during the critical spring and fall months?
Tangential to this - how do the motivations behind public schools in the US compare to the similar systems being established in other countries during the 19th century (particularly Canada and the UK)? Were they established for broadly the same reasons, or were there decidedly different motivations?
More directly, it was to keep kids off the streets. There are a couple good books about the history of the public school system in NYC, and one of the main reasons for the establishment of the public school system there was that there were a lot of children of immigrants with nowhere to go during the day while parents went to work. Gambling, stealing, and harassing people were not uncommon and so the City Council moved toward establishing a free school.
Attendance wasn't mandatory until many decades later so for anybody who needed kids around for farm work, it wouldn't have mattered.