Libraries were formed to share very expensive printed books in a common space. Over the centuries, books and information became very cheap, and now mostly the common space remains.
It certainly has real value. Do we need to keep the pretense of the books as the real purpose for it?
Max Headroom, episode ABC.1.3 "Body Bags":
Paula: "...what's that?"
Blank Reg: "It's a book!"
Paula: "Well, what's that?"
Blank Reg: "It's a non-volatile storage medium.
It's very rare. You should have one."
https://www.youtube.com/watch?v=me6oNB4M7N0Books still work when the power goes out or the copyright cartels revoke - intentionally or not - your ereader's license. Widespread preservation of knowledge on non-volatile media is protection against future problems.
That said, access to books is still a vital service. Not all printed publications are cheap, and not all books can be replaced by Wikipedia (even if you completely ignore fiction, as that argument does by necessity).