Somebody is rent seeking.
I would wait 1-2 weeks after class started to buy books. Especially if the teacher decided you need 6 of them to finish the class. It was usually pretty clear which ones they were going to use by that point.
If that's true, it's a huge change from when I was in the university. But it seems implausible in the extreme, IE, I'd call bs here. University libraries wouldn't want to buy class textbook 'cause they're worthless at the end of the term. Students are expected to buy (electronic, DRM'd) textbooks are at student stores, not check them out of libraries. Libraries are not expected to service individual course but to be places of general research. Professors have the whole Internet to give links for supplemental material. Photocopied "Course Readers" is another avenue.
Implausible in the extreme to have forty or so copies of a book?
And most textbooks aren’t republished every year. You can use them from one year to the next. Why would they be worthless at the end of the term?
Think of a classic CS text like the Dragon Book. They’re on the second edition since 1986.
Since the fundamentals of the material are unlikely to change within the span of a year, the revisions to the textbooks are mostly cosmetic in nature—updated graphic design, rearranged problem sets (to deter the used book market), etc.
Also note: I'm speaking about the US. Things could very well be different elsewhere.
Sure, if a bunch of random people show up and take them all at the same time, which prevents actual students from using them, it may be a problem. In practice, I don't remember ever having this issue.
Access to the library was free for all, you didn't have to be a student or anything.