Libraries are a vital place for information and books. If you don't believe me, this article by Neil Gaiman might convince you.
Most of the time, librarians do everything they can to provide services and programs to the public, mostly by making a lot out of very limited resources. Which is why, contrary to popular myth, librarians don't have a lot of time to read (even though they may be aware of new titles to recommend to patrons).
Which brings me to books in libraries. I recently wrote this article for The Write Life about what authors should consider if they want their books to gain traction in libraries.
One commenter on the article pointed out that a lot of decisions in libraries tend to be governed by budget. And unfortunately, she's right--libraries not only have to guarantee that their budgets won't be slashed the following year, they have to justify the use of that money.
Which is why articles like Neil Gaiman's are so important. Libraries aren't obsolete due to the internet--they still offer information and books, they're just packaged in a different way. If more people realize this, it increases the likelihood for libraries to get the funding they need, especially if they are seen as a valuable asset to community education.
So if you are an author trying to get your book on a library shelf, see what you can do for your local librarian today to help them serve their community. Conversely, if you are a librarian, perhaps open up your mind to that local author to see what kind of collaborations can develop.