I recently read an article that explores the history of why the state was merged with schooling in America. I'll link it below.
Like so many other state-granted privileges and monopolies, the public school system in America arose as a result of special interest groups trying to edge out competition.
In the early 1800s over a million Catholics emigrated to the United States. For some context, the US population in 1820 was less than 10 million. Along with the growth of the Catholic population was the rise in the number of private Catholic schools.
There were many Protestants who were disgruntled by the teaching of Catholicism. It was Protestants who led the way toward the merging of state and school. While government schools were officially "nondenominational", in reality Protestant hymns and prayers were the norm in early government schools,
Perhaps today proponents of government schooling are motivated by some theoretical "public good", but it should be noted one of the major original driving factors was that one group was losing market share to another group, and thus sought sanctioning by the state as a remedy