The economy is based on goods and services being exchanged for money. A book is a good that took time and resources to create. A publisher invested into that good with the intent to make a profit, and having it available online for free without their consent circumvents that.
I’m not saying it’s ethical or that I agree with it, I’m just saying it makes sense.