Yes but this also takes money away from the author, who put in a ton of work to make that book. It's not as simple as claiming the piracy is 'ethical' just because it circumvents the publisher
I know at least one author that refuses “out-of-band payments” for that reason.
And this is to say nothing about advance payments where the publisher is taking the risk of a book not selling, and the author gets paid regardless, which can be a big thing for small authors too.
Using piracy from the beginning ensures nobody gets paid.
A library can only lend as many copies as it purchases. Someone selling their copy can only sell the copy they purchased. These secondaries are constrained by the primary.
Your talking about one person buying a single copy and then distributing it for free in perpetuity. This secondary is not constrained by the primary.