Is it legal for a store clerk to scan my ID when I buy alcohol (without my permission)?

I recently bought beer in Illinois (it was at a Casey’s General Store), and I was asked to show my ID. I handed it to the clerk and just expected him to check my date of birth and picture, but he flipped it over and held the barcode under a scanner. I was sort of annoyed that he didn’t ask me if he could scan it. Maybe I’m just paranoid, but there’s personal information in those barcodes and I don’t like the idea of my name, address, birthdate, and who knows what else (possibly SS#) going into the store’s computer.

So, here’s my question… do you think it’s OK for stores to do this, particularly without asking first, and would you be concerned if someone scanned your ID? Also, does anyone know if there are any laws that regulate ID scanning? Thanks!
To clarify (for toodeemo), I don’t mind showing my ID since I’m in my 20s, but I don’t like the idea of them scanning the barcode on the back and having a record of my personal information in their computer.
For those of you who aren’t concerned about privacy with regard to ID scanning, here’s why I don’t like it…

First, I don’t want the store to have a record of my personal information, which could be potentially sold / used for solicitation purposes.

Additionally, I’m concerned that it could be sent to a state/federal database and I will be labeled as a drinker… and you never know how that information could be used. Police could have a list of drinkers that they would be more likely to be pull over to check for DUIs after routinely running their plates. It could be used in criminal or civil cases (to establish a drinking pattern). Who knows what else…

I’m not saying any of this is happening now, and I’m not accusing anyone of doing anything wrong. I’m just saying that it’s all possible depending on what happens (or could potentially happen) to our personal information once it enters store computers. If anyone has other info, please keep posting answers. Thanks in advance!