Basically there is a time when education was almost exclusively monastic; those who were not taught privately were taught by religious institutions.
The public schools were free of that influence to a greater extent.
There is one more tier of school you don't mention which sits somewhere below "public": the "commercial school". There were some of these owned by the livery companies, and were a tier of schools that were created along the lines of the public schools but before the school system was fully established. Most of them were not fee-paying but were funded by donations or livery company charitable funds. They taught largely vocational skills (but professional ones rather than technical ones); parents sent their kids to commercial schools to bring back the knowledge to professionalise the family business or to set them up in a trade.
(I went to a school that was originally founded this way, but was a part-state-owned grammar school by the time I got there a century later)