The copyright law here is broken in general.
If there are only 25 copies and it's impossible to buy a new copy from the publisher, who's actually getting hurt if you "pirate" that book? How can anyone claim losses if they clearly don't want your money for a new copy.
The authors of the alternative books, which you might have bought instead if your weren’t reading old books like a high seas pirate.