But you did agree.
Either in the fine print on the form you filled out to get the card, or on the back of the card itself. Probably a statement that by using this discount card, you agree to the terms & conditions posted somewhere in the store.
And since you used one on your purchase, you did agree to allow the collection and sale of that information.
And that ‘bogus’ card the cashier uses is made unique by adding the time-of-day and cashier lane to it. Most people regularily shop at about the same time-of-day, and buy many of the same items each time. So eventually, they have a unique record on you, even if they don’t have a name & address to go with it.
And unless you paid with cash, they already have your name & address. It’s on file for a credit card, or it’s printed right on your check.
Yes, they do. I’ve worked in IT at the largest food wholesaler, and they do collect this. Like whack-a-mole said, that is really trivally easy with modern technology. Automatic at the register, no extra work for the cashier, and not noticable by the customer.
And it is useful. And sellable!
For example, Jiffy peanut butter will pay good money for a list of people who buy peanut butter every grocery trip, but buy a competing brand. Because that’s a good target for them; sending coupons & trial offers to those people could pay off. Jiffy couldn’t afford to send to all store customers, it wouldn’t be worthwhile. But just to a specific list of regular peanut butter buyers? Sure, that’s real valuable to them.
People who haven’t before, but now start buying the smallest size of diapers? Gerber would like to know about them, because in a couple of months, sending them an introductory coupon for Gerber baby food could get a very valuable customer.
Stores do this now, even without the personal info to sell.
Notice those instant coupons that the cash register prints, that are good for your next trip to the store? Those are printed specifically for you, and will be different from the ones printed for the previous customer. They are based on what items you purchased, and what brands have paid the store to present them to the customer.
For example, if you buy dry-roast peanuts, but not Planters brand, you may get a coupon giving a discount on Planters. The coupon amount might even be customized, to the specific size you buy, and for the appropriate cents-off to bring the Planters brand down to the other brands’ price. And the price is calculated for the prices in that specific grocery store. (But not if you buy generic dry-roast peanuts – generic buyers go by price; they have no brand loyalty. So it’s not worth offering them coupons to try your brand, they will just go back to the cheapest one after using up your coupon.) The store is paid a few cents for giving that coupon to you, and even more cents if you actually redeem the coupon on a later visit. That’s done right at the register, without any identifying info at all. Just knowing that you bought some peanuts.
Sometimes combinations of products will trigger coupons. If you buy marshmallows, graham crackers, and chocolate bars on the same trip, you might get a coupon for S’mores candy bars. People who buy flour, oil, eggs, etc. are tagged as ‘home bakers’ and might get a coupon for a brand of yeast.
The grocery business is cutthroat competition, and real small profit margins. Absolutely anything that might give them a bit of an edge over their competitors is worth pursuing.