Virginia requires that one show an ID and address, so that records can be kept on sales (presumably to track compliance with the amount and frequency limits.) In a typical store (e.g. grocery store pharmacy counter), this is done in a log book, which requires the sales drone to look at your license and write down the relevant info.
However, at least drug store chain now has a scanner that reads the barcode on the back of the driver's license.
On one hand, the information must be collected by law; having a cashier write down the info is a hassle and slows down the purchase. The scanner really helps accelerate the process (and probably helps with compliance, too.)
On the other hand...I certainly hate the idea that it's becoming that easy to collect personal information. At least with a driver's license scan, I know when data is being collected. RFID on the license...the horror!