Sudafed isn't an OTC medicine; it's a BTC medicine. Most medicines aren't OTC. But there are, obviously, OTC products that require ID; for instance, every alcoholic beverage.
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?
That's just begging the question. The only reason it's BTC is that you have to show your ID to get it.