I assumed they look at credit cards too, and swapping store cards wouldn't trick them unless you're paying cash. But maybe the number of people who do that is so small that stores haven't cared to catch it.
I don't necessarily think that is technically feasible. At least in the US, they have to be PCI compliant, and I think of that is they cannot store a credit card number. In addition, Chip and pin works differently than a credit card number, as the purchase is tokenized versus to an account number, making cross purchase correlation more difficult.
Merchants can store the account holder's name and the card's last 4 digits, which is pretty much all that is needed to correlate transactions.
This was back in college when we mostly paid cash.