With that said, even now, it’s normal that liquor stores only look at IDs without transmitting or recording the information anywhere (in the absence of fraud concerns), so if the purchase itself is made with cash, it has most (not quite all) of the same data privacy and security consequences as a true anonymous purchase.
This is very different from the online porn age verification proposals.
That's not entirely true - once you look old enough most places will stop asking for ID.
As for why: because there is (or at least, was) no other system to identify whether someone is underage and, by extension, more likely to underestimate the consequences of their actions, make worse choices under the effect of alcohol, and suffer its effects more strongly. Same reason why the legal system makes a difference between minors and adults.