Yes, yes, it's universally held to be a societal benefit (and I agree with that) but it is (forced) charity. The free stuff, building, and employees are funded by money taken from other people (usually property owners in the US).
Now, I both fund and use libraries - and I see them as one of a few true examples of taxing for the common good. BUT it isn't a magic place that makes any free stuff automatically a societal good. Few people will argue with a part of their paycheck going to let poor kids read. But change that to funding poor kids playing all the latest video games and you will have less universal support.
(Where you are probably getting tripped up is that games are similar to the movies offered in most libraries, but the truth is that free movies are also a stretch for societal benefit and exist more because taxpayers don't pay that close attention to smaller budget items than the fact that most people feel everyone has a right to free movies.)
I concede that providing free games—or movies—is not necessarily a societal good and will meet with opposition. One can imagine the cries: "We won't pay for those kids to be exposed to violence! Bloody hell, what is society coming to!"
However, to call libraries a charity is a mischaracterisation. Indeed, it is the first time I've heard the term used. Let's go back to the foundation, stripping away the free stuff and media, leaving only books. Libraries are, in essence, storehouses of information. Libraries of antiquity archived works found nowhere else, and scholars made journeys to use them. Later, circulating libraries provided books, chiefly fiction, a booming business with the great Victorian writers, and these came at a cost. In the 20th century, we saw the rise of the government-funded public library. People are most familiar with lending libraries. Parallel to these are the reference libraries, closer in spirit to the libraries of antiquity and mostly frequented by students and scholars.
Fundamentally, today's libraries provide information to the public without a paywall—a key enabler of democracy; if the public hasn't got access to all information, they can't make sound decisions regarding government; it is akin to censorship. At a simpler level, libraries are central places of community, not solely the resort of poor children (who, indeed, are often a fraction of the patron population). Affluent children make full use of the storytelling, books, and activity weeks. I don't know how libraries are viewed in the US, but certainly elsewhere, they are held in esteem, as houses of knowledge, learning, and peace. Students spend their entire day there because of the tranquil atmosphere. The elderly love to chat with the staff, many having no one else to talk to. Take away the local library and it will be a blow to a community.