Purchases of alcohol at the grocery store are not individually logged and tracked by personal ID. I’m certain that is not what happens when I show my birth date to a cashier.
Most large retailers (e.g. Target, Walmart) now scan the barcode on your ID at the POS when buying spirits.
Because it's required by law, or because they want to track you for their own purposes and if you don't like it you can patronize someone who doesn't do that?