Either way, libraries/librarians deaccession books all the time that outsiders might think "that's so valuable, why'd you get rid of it?"
There is only so much budget/space to store stuff. You get rid of stuff that is no longer relevant to your mission, or lots of other libraries have so you don't need one too, or just isn't _as_ important to your users/mission as other stuff. No library has infinite space.
Every book that comes in gets scanned and assessed to one of a few possible streams: - List for sale across all markets - Donation (too many of that title in inventory, desired by one of the specific literacy partners) - Recycling (too many of that title in inventory, not desired by literacy partner, or condition too poor) - ARC Books
That last business line is the Antiquarian, Rare, and Collectible group. These books are diverted to a team of people whose sole job is to manually price these books and work with rare book dealers as well as some of the more high-end marketplaces to move them. This went for more than books as well, as sometimes there were interesting related pieces that came in the door.
Also, fwiw, when I was there any book like this that sold for > $500 had a whole separate commission structure where at least half of the sale price would go to the group that sourced the book. So if an academic library sent a book from the early 1800's, and that sold for $15,000, they library would get $7,500 back.