The responses pretty much cover your question.
If you are not driving, nor applying for credit, the dealer has no legitimate reason to be asking for your ID. If they let anyone drive that does not have a valid ID it is a huge insurance issue. Plus, since you should have a sales person going along on the drive, it helps to protect them. Believe it or not, bad things happen sometimes to us car sales persons. People would also steal cars if ID wasn't required, no ID no insurance claim.
Last month a customer test drove alone, had an accident. Since they did not have a sales associate with them, and did not have full coverage, we now have to seek legal recourse. Potentially someone may lose their job over this as the rules were not followed. Thus, my job means more to me than being lazy or afraid to do things the correct way.
If applying for credit, proof of identity is required. You couldn't guess how often someone asks us to run their mothers, sisters, husbands, etc... credit. Nope, not legal.
My posts are solely based on my opinions and for my entertainment, contact a professional if you need real advice.
When you get in debt you become a slave. - Andrew Jackson