https://en.wikipedia.org/wiki/Public_libraries_in_North_Amer...
As you can see, libraries in the US were founded to advance 'learning' and 'piety'.
Here is the treatise of one of the biggest influencers and advocates for the creation of the public library system.
https://ia600909.us.archive.org/10/items/intellectualtorc00t...
I strongly encourage reading all the citations in the Wikipedia article surrounding the creation of the library system. Sadly, many of them are paywalled and inaccessible via even the Archive project, Google Books [ed - to be clear if you think I am pro-publisher, you are wrong: the former two projects had more potential to do good than I can express], and likely your local library. But you can find enough to prove the point.
There has been a massive shift in the mission of libraries in the past several decades, and the public didn't get a say.
The mass destruction of older books and classics is easy to observe by searching your own library catalogue. I provided some sources and one commenter even provided a link where librarians justify the need to destroy books using outdated or biased language.