I worked in a library children's department for a long time, without coming across an inappropriate book, unless it was In the Night Kitchen by Maurice Sendak, which did cause a stir back in 1970. Little Mickey losing his PJs and flying all around naked. (Actually, who hasn't had that dream?)
By the time I was doing story hours, no one gave it a second look. Just another children's book, like Strega Nona (banned in some places) or Cat in the Hat (Not this book, but Dr. Suess is not exempt from having some banned books). I've seen books deserve to be retired for out of touch content, and others that may need to stick around just to remind us of our past. (Huckleberry Finn by Mark Twain comes to mind.) Never came across anything else that we had, or in catalogs of childrens books to buy, that could have been considered pornography. But "porn in the library" is just a code phrase. And while I've been thinking that it is about a lot of new-age, "woke" (shuddder!) books, and they do get on the lists, I am seeing books of 40 or 50 years vintage on banned book lists. And yes, there are some books of yesteryear that showed misogyny, lack of diversity, or historical inaccuracies. But quite a few are old classics, such as Where the Wild Things Are (Maurice Sendak takes another hit - "too dark") and Charlotte's Web, (because of animals thinking and talking like humans). What's up about that, Doc? Disney, Looney Tunes and Hanna Barbera (to name a few), watch out - you hold the largest corral of thinking and talking animals. (Well, perhaps not Wile E Coyote - Super Genius.)
I think the real controversy is about what some people describe a "family," and how there are children's books that illustrate differing family structures, as well as depict varying beliefs. Some contain elements of fantasy. There seems to be intense fear in some circles that even just the existence of books outside their parameters can morally corrupt their children. That their own ways of raising and teaching their children can come to naught because a child was exposed to a book that depicted other worlds outside their own definition.
Once, for a child like me, the public library was a wondrous place, and I freely wandered from the children's department to the young adult area, to the fiction and non-fiction shelves - grabbing any book that caught my eye. I am not naive to think that there aren't books there that are not suitable for children. Or books that have pictures more suitable for the medical college library. But again, parents have the responsibility to instill the values they live with, to steer their young minds in the direction they think is best, and to understand that their children will encounter all sorts of materials in the world that may shock or upset them - even challenge some of the beliefs held in their own home. It is inevitable. Banning a children's book is not going to stop that, in fact, it could inflame curiosity.
So, especially in the children's department, parents should be near their children to help them choose books that they think are suitable. Nothing wrong with telling a small child that "this isn't for you," but a lot wrong with telling all children that. A parent can also go to the library without the child, select books they approve, and still be able to provide free books to their children. Books are expensive - a library in your town is a precious thing.
As the children get older, they will find that some of the titles in the young adult sections include serious works about unpleasant, and horrific things. They also show teenage issues, including the emotional obstacle course they run, just to become adults. If you have laid the groundwork of encouraging thoughtful curiosity, you will be able to talk about what ideas and stories your children and teenager may encounter in the world.
As a young adult reader, I came across real life things that I could not believe went on in the world. Some of them shook me deeply, like The Diary of Anne Frank (banned in some places), yet it inspired hopeful poetry, that many years later, as an adult, I would be honored to read, alongside several child poets, when the traveling Anne Frank Exhibit came to my state.
But I also read beautiful and uplifting books, both truth life and fantasy, especially all the Tolkien books - and learned valuable lessons from them. I spent my high school senior year in Independent English and I spent lots of time with Vonnegut. Humor and satire became a source of creativity of my own. Still later, my family tree revealed connections to Mary Perkins Bradbury, who was accused of witchcraft in Salem, (who somehow got out of jail, no one is quite sure how) and Lizzie Borden, who - well you know the story. If anything, should I be concerned about the effects of their inherited genetic tendencies. Sound ridiculous? The gene pool is true. People whose ancestors survived the plague pass down resistance to it. Lots of genetic disorders lurk in inherited genes. And sometimes, genes just go rogue. I am not sure if anything my ancestors read or heard as children is imbedded in my genes. What a wonderful science research paper that could be.
The point is, if there was porn in my libraries (maybe in the medical dictionaries), I didn't encounter it, or have forgotten it. Yes, I think there were some teenage giggles way back in the stacks. Yes, some books have explicit text. I leave it to the librarian - an educated, skilled expert on book classification to place such materials in the correct place.
Because recently, I've seen book bans that horrify me more than seeing Mickey naked In The Night Kitchen.