I think that's dependent on the library. The few libraries I'm familiar with are always happy to accept donated books and put them in circulation (as long as they're in good condition).
It probably also depends on the book. I have tons of outdated books on obscure topics within engineering, science, and computing. I doubt anyone would check out my 1995 book on the Vi text editor from a library. Although, if I'm lucky, perhaps it could be a collectors item some day. In reality, I'm probably going to just say "thank you for helping me so many years ago" and respectfully recycle the book.
That's probably true, I would expect libraries not be very interested in obsolete technical books.
However, I image many of the books people have don't match that description. And in my experience libraries (especially school libraries) are happy to take them.