And this comes down to history.
When these schools were founded, the alternative was to have private tuition - as opposed to be taught "publicly" and live with children from other families.
(The school I went to was founded in 1513 - but is known as a private school rather than a public one because it was never a boarding school).