Historically the primary goal of public schools, the reason they were instituted, was to educate the poor so they could get a job and take their place in society. The middle class already had private schools and apprenticeships, and the wealthy were tutored at home.
In class societies, the middle classes have tended toward the professions while the aristocracy receive leadership education. Of course, that left out the lower classes, so many nations established public schools to educate the poor. If we have all these three systems working together, society benefits. But when nearly everyone is getting an education for the poor and hardly anyone is being trained as a leader, the whole nation suffers.
Public schools do have a place, but it is essential that they don't become a monopoly and that professional and leadership training schools are maintained.