I don't know about this, stores around me are scanning people's IDs to verify their age.
I guess I could make an ID (not a counterfeit government ID) that uses the same encoding for the birthday.
They are scanning the PDF 417 barcode on the back.
Here are the specs for what appears on the driving license/ID and how to read the barcode:
https://www.aamva.org/getmedia/99ac7057-0f4d-4461-b0a2-3a553...
They issue a new spec every 4 years.
Stores collect not required customer information often.