Public libraries destroy unsold book donations all the time. I often tried to give away some old books I have online and nobody wants them. Some of these books have some nostalgic value to me so I hate to see them just get destroyed so they just lie in my shed.
Which is something I argue against constantly (and at least my local library tries hard not to) --- discarded books are placed on tables near the children's area usually and folks are free to pick them up (it might be that a few of them are sold, I certainly get a lot of ex-library books when buying on Thriftbooks and Better World Books).
A partial solution there is of course a larger budget and a "last copy" policy where the last copy of a text at least is stored away in deep storage against a future loan.
The local libraries also accept book donations for an annual fund-raising sale.
I have a copy of Michael Abrash's Graphics Programming Black Book (it's like 1k+ pages) with DESTROY written in red on the sides. I appreciate that someone saved it and sold it to me for cheap :)