The controversy is about the former, because that is the type being targeted with legislation, and arguably as a controversy it is overblown because it does not overlap with the latter which is also available to children and almost always has a superior selection covering a wider breadth of subject matter and genres with greater depth. There is something to be said about letting librarians at either type just make their own decisions without legislating them, but public schools are right at the intersection of all kinds of messed up policies around the staff and students and curriculum due to the nature of these institutions so this honestly doesn't rate very high. You can't fix that, because fixing that would mean fixing people in general, so the alternative is to sidestep it by sending children to private schools, but then it will just be a different group of people making policy decisions about the staff, students, curriculum and materials accessible to them.
So here's a good litmus test: if you can legally procure and read a book, it is not banned. We don't actually ban books in America, although at points in our history portions of the country or what would become the country did. How accessible, rare, attainable or what condition it is in, well, nothing is guaranteed.
What do you think is the purpose of a school library? Surely the school library would serve no purpose if every student had the money to buy the book from Amazon or transportation to regularly visit the public library.
Removing a book from a school library does mean that some part of the student population loses access to the book. Sure, some kids can still get around it, but that is far from universal.
Unfortunately sometimes they aren’t. For example, I could not check out books from the public library because my one parent could not check out books because she didn’t know where the books she checked out were nor was she able to pay to replace them. That’s life, but it isn’t world shattering and when they have disposable income and reach the age of majority they can make their own life’s choices and not continue to suffer the choices of their parents. There’s no shortage of excellent reading material and no school library or public library will have every book one might want to read. Either will have a lot though, so make do.
Their methodology wasn't all that great either:
"We define a school book ban as any action taken against a book based on its content and as a result of parent or community challenges, administrative decisions, or in response to direct or threatened action by lawmakers or other governmental officials, that leads to a previously accessible book being either completely removed from availability to students, or where access to a book is restricted or diminished.
PEN America analyzed all relevant news stories on challenges, restrictions, and bans to school library books, curriculum, and classroom libraries anywhere in the United States, over a nine-month period. We consulted school district websites, corresponded with librarians, authors, and teachers, and reviewed letters to school districts organized by the National Coalition Against Censorship (NCAC). We confined entries in the Index to actions that resulted in removals or restrictions of books of any kind for at least a period of one day."
Not making any kind of normative point here, just observing that it's a little less clear than "selfless librarians vs meddlesome politicians".
It that were true - that is, if the politicians were in the right, and the librarians the wrong - the laws in question would mandate the presence of needed books (at least by request), not the absence of objectionable ones.
Possibly they know well what is wanted,but certainly they have no special claim on what is needed.
The librarian works for the library, which is a far cry from being the sole arbiter of what books should be bought with public resources, in much the same way that the commanding officers of all the warships hanging out around Ukraine don't get to decide whether to start shooting or at whom.