Libraries, (like parks, schools, and roads) are a public good that benefits society but cannot be operated profitably by private entities.
Sure they can. Indeed, that's the whole point of some private libraries.
Some public libraries are great resources. Others are not. State funding is not the only funding of public libraries. The Missouri State legislature has decided to let cities and counties fund their own libraries and not contribute State money to them anymore.
State parks are often poorly or not maintained properly and some have become havens for homeless camps. Some of these weed infested places of human rot is not a benefit to society.
State schools are often not a public good anymore, since they fail to educate kids in read, writing, math, history, or science. Schools are not libraries. False equivalence fallacy.
State roads are only part of the roadways in a State. There are also federal roads, county roads, city roads, and private roads. Roads are not libraries. False equivalence fallacy.
There are private parks. Some are quite beautiful. Locally around here, the Butchart Gardens is one shining example (built in an old quarry pit).
There are private schools. They can operate profitably and can turn out much better educated students.
There are private roads, even multilane limited access highways. Often they are the only way to get somewhere, or are faster to get somewhere than using the freeways (federal public multilane limited access highways). These private roads are paid for by tolls.
There are private libraries, even private libraries that circulate books. Typically, you pay for a membership in such libraries.
One of the most impressive private libraries is the Jay Walker library (no membership or public access). A beautiful piece of architecture, and an amazing collection.