If you buy in a bookshop, for cash. If you think Amazon et al don't know your interests, I have a bridge to sell you.
Even bookstores don't always guarantee your privacy these days and libraries just keep getting worse on the privacy front. Librarians fought hard to keep the government from collecting lists of the books we check out, but they lost that fight, and now they're pushing users to use third party apps to download DRM filled digital ebooks.
If they know then they certainly don't seem to act on that information.
"Frequently bought together"
"Keep shopping for"
"Deals for you"
"Gift ideas inspired by your shopping history"
"Buy it again"
"Pick up where you left off"
"Related to items you've viewed"
"Top picks for you"
"Products from Small Businesses related to items you viewed"
"Inspired by your shopping trends"
"Recommended deals for you"
"Fashion items recommended for you"
"More items to consider in Outlet"
"Related to items you've saved"
"Tap to browse" (related to items I've viewed or purchased)
"More top picks for you" (this one specifically has books related to books I've purchased or shown interest in).
"Books that you may like" (ditto)
"Everyday essentials for you"
"Similar to your past purchases"
"Hassle free reordering"
[...]And that's just in retail...
The data being collected by companies is increasingly used to influence more and more of your life, but you aren't allowed to know when or why. Amazon's data could be being used to show you certain items while hiding others from you when you shop at amazon.com. It could determine what prices you pay vs your neighbors for the exact same items. It could be used to push certain content on prime. It could influence what ads you're shown. Amazon may sell your data to businesses they partner with (like “Starbucks, OfficeMax, Verizon Wireless, Sprint, T-Mobile, AT&T, J&R Electronics, Eddie Bauer and Northern Tool + Equipment.”) and they too will use that data in whatever ways they feel will benefit them.
Amazon isn't collecting and storing massive amounts of data on every facet of your life just to ignore it. They spend the money required to gather and keep that data because it is highly valuable to them in one way or another. That might mean taking more of your money from you, or that might just mean manipulating you and trying to sway your opinion, but you can be certain that they're using that data every chance they get to their own advantage and you can be certain that they aren't going to tell you when they do it.
No idea if they ever fixed that or not. My friend had to try to track down which books were even on the device and then re-obtain what he could.
Also, if some DRM'd digital book you've bought is truly impossible to remove from the device you're using to read it, an alternative is to just pirate a copy from certain obvious sites (cough, libgen, cough) as a backup edition in a format you fully control. Since you did indeed buy the book, also having a pirate copy is at least morally legit as far as compensating the author goes, even if it's legally shaky. Then again, many laws themselves are legally shaky, if not morally too. This applies especially to all the absurd legal contortions and false outrage practiced by proponents of the legal dumpster fire that is DRM.