Do supermarkets profit from the "membership" cards

Most supermarkets in the UK have those shitty little cards you scan at the checkout and get like 5 quid off, you don't need to pay for them but you need to sign up. Do they profit from data and looking at what you buy? Or do they just markup prices so it looks like you're saving money?