In brief, read 'for the public' rather than 'by the public'.
Another example - public houses (aka pubs) are generally for-profit private (or large chains may be public in the sense of being listed) companies that take your money in exchange for real ale and good food; not social housing!
The more confusing thing is that we now (see history in sibling comments) have 'private schools' too. What you call 'public' are 'state' schools here, or something more specific where it's implied ('grammar', 'comprehensive', 'academy').
Another example - public houses (aka pubs) are generally for-profit private (or large chains may be public in the sense of being listed) companies that take your money in exchange for real ale and good food; not social housing!
The more confusing thing is that we now (see history in sibling comments) have 'private schools' too. What you call 'public' are 'state' schools here, or something more specific where it's implied ('grammar', 'comprehensive', 'academy').