I did my searching based on music/CDs since the wording is a lot more clear, but the same rules apply since were still talking about copyright infringement.
As long you’re making the copy for personal use and aren’t selling/distributing, you are fully in the clear:
- It’s okay to copy music onto special Audio CD-R’s, mini-discs, and digital tapes (because royalties have been paid on them) – but not for commercial purposes.
https://www.riaa.com/resources-learning/about-piracy/
As far as ethical, this is mostly up to you, but unless it’s from an independent artist/distributor, I personally see it as: if you were never going to be a customer to begin with, they’re not losing anything. I am, however, against then reselling it yourself. Ymmv.
Technically speaking you’re supposed to destroy your local copy of you no longer have the original since the rights stay with the original. That being said, no one is coming to knock on your door for photocopying some books you owned and no longer own.