Was theft? Legally, yes. Absolutely. Copyright law is ironclad. When you download a $250 textbook for free, the author (who usually sees 10% royalty) and the publisher (who needs to pay editors) lose revenue.
This tension came to a head in late 2022. Following a significant crackdown by the U.S. Department of Justice and federal authorities, the domains associated with Z-Library and booksc.org were seized.
If your ISP blocks these sites (many do in the UK, US, and Germany), download the Tor Browser. Accessing shadow libraries via .onion addresses remains unblockable.