The library does not sell my data to thousands of corporations as its core business model. At the book store I can pay cash if I so desire. Yes you're right, it's truly no different from a detailed live-log of everything you read, analysed, packaged, and sold to whomever pays for it.
The library knows which books you checked out, and the book store knows which books you've bought. Is this really that much different?