It's more than that.
The original purpose of loyalty cards, or at least the purpose that is commonly known, is customer retention. Clubcard is a perfect example of this. To earn clubcard points, you need to spend money at Tesco, to get certain discounts, you need a clubcard. Customer data is one thing, but customer retention is another.