I’ve worked in libraries, on and off, for the past 13 years. When I’m not working in them, I’m still there all the time, and have been since I was a wee little child. I’m still not an expert on the back rooms, but I can tell you the biggest thing people don’t understand about how libraries work: Libraries have to buy the books.
Library books are not all donations, and they don’t come in a big box from the government. There’s a librarian — sometimes a whole team of librarians — in the back ordering books based on a budget they receive from their board or other governing agency (like a school budget department). If they didn’t buy a popular book, they probably just couldn’t afford it. If it’s been out for a while, they may even have bought it, checked it out until it fell apart, and are waiting for money to buy another one. (This especially happens with classics assigned in schools that get a lot of wear and tear for a long time, not just a few years while they’re trendy). Or, the library may not be aware there’s a demand, in which case almost every public library has a way for you to request they purchase a book, and they’ll do their best to get it for you. Many even have waiting lists for books that haven’t been released yet.
Authors, this does not mean you should pretend to be a patron and request your own book. Librarians know their regular patrons, and they are masters of research. They will know. What you can and absolutely should do is take a copy down to the library yourself and donate it, because almost all public libraries take donations. (School libraries may not). Tell them who you are and who your book is for, and you’re not only going to get your book in the library, you’ll get librarians who can accurately recommend it and know that it’s by a local author. You might even be able to swing a book talk at the library (although if they have a speaker honorarium it will be very small).
If you’re a self-published ebook author, well, I’m sorry. While many libraries offer ebooks to their patrons, they usually do this by subscribing to an outside service, which usually gets ebooks in bulk from publishers. This is a simple arrangement for the library and it gets them almost all the ebooks they want. They couldn’t buy your ebook for the library even if they wanted to have it. Being a local author won’t help you here, but being successful will, so focus on sales and come back around to library options later. You can donate a self-published book, and if you’re both local and reasonably well-known in the area, you can do a talk if you want. You can also check if the library has any events related to your genre, and you might be able to piggyback off of those and be part of a multi-author event. If you do that, you at least want to have memorabilia like bookmarks and whatnot available so readers will have something to remember you by when they get home.
Readers! While the library buys most of its books, as mentioned above, most public libraries take donations. Ask beforehand and they’ll you what will happen to donated books, but it usually goes like this: They go through the books and pick out anything they want to put on the shelf. Then they check if there are any really nice books another library might want, and ask the library in question (but this doesn’t happen a lot because if it’s something a public library might want, the first library wants it). Then any remaining books, which honestly will be most of them, will go into the library’s book sale (which may be ongoing or a regularly-scheduled event). This still adds value to the library! They may make a little money, and they also appreciate it because having a book sale makes patrons happy. Finally, depending on the library, they’ll collect any books that haven’t sold in a while and usually donate them to a local thrift store.
I’m telling you all this because people don’t understand it, especially when book challenges come up, but also so you can donate the books you really want the library to have. They’re not being forced to carry any particular titles, and usually they’re not purposefully ignoring books either. They’re doing the best they can to meet patrons’ needs with the budgets they have. So, requesting titles or donating them is your best bet to see the library shelves you want. If you’re an author, it’s a simple way to promote yourself to a host of potential readers, and if you’re a reader, it’s a huge gesture of support for your favorite authors. If it’s something that’s not on the shelf but should be, the library will be thrilled you thought of them!