The librarians generally get to choose which books they have in the library - there are broad guidelines (there has to be a certain percentage of science, history, literature, etc.).
The presence of these titles can be blamed entirely on the librarian.
The principal operates on the assumption that the librarian is a licensed professional who takes his job seriously - that there is no need to examine every book the librarian purchases or keeps in the library.
And you know what happens when you *assume* something. And here we have a sterling example.