Like I said, you're not obliged to be in a loyalty program, and you can buy in cash, debit card - at least in Europe that's pretty common.
Plus I didn't want to go through the whole type of sellers on amazon. You have:
Products sold by Amazon: these are all amazon brands + products from other brands (maybe this is the closest to the retailers)
Products Fulfilled by Amazon: Where amazon only deals with fulfilling and customer service (to some extent), and Shops pay referral fees and fulfillment fees;
And you have Fulfilled by Merchant: where people set shops and pay only referral fees (this is maybe the closest to set a quiosque in a mall);
So it's quite tricky, yet Amazon gathers data on everything.
In the US (not sure about EU countries), there is price discrimination based on loyalty program membership. Some retailers (Costco) require membership to even walk in the door.
For loyalty programs you give explicit consent to be in a marketing program. They can't simply use your banking data to profile someone, neither your tax number which you give (in some countries) in order to get a valid receipt.
I'm also not familiar with what you sign away with a credit or debit card but I would not be surprised if it included this tracking since that's a core part of the credit card business model.
I do admit to almost complete ignorance on this topic however so you could be right.