It's nice to own books. Read them multiple times, dog-ear the pages, scribble in the margins, risk reading them in the pool. But for the price conscious general reader just inter-library loan. If you want to buy To Kill A Mockingbird or The Hobbit be my guest, but any library in the US would have a few copies of those. Public libraries are awesome. Use it or lose it.
AFAICT, publishers don't donate books to public libraries. Those public libraries use our taxes to buy books. So if books are expensive then our taxes buy fewer books. San Francisco public libraries spend $200m per year, of which 15% is spent on 'collections', including books, ebooks, magazines etc. That's $35 per resident. The denominator includes newborns, infants and others that can't read or don't like to read.
One reason I say SFPL is great for all^H^H^H many Californians+ is their book collection is available for free pickup at a your local library via the inter-library sharing program, Link+ [1].
((People, submit purchase requests at your local libraries. It's what it's for.))
The other is that they are subscribers to "O'Reilly for Public Libraries", which lets people access Everything from O'Reilly for Free [2].
[0]: https://sfpl.org/