It was an assessment of your mental status. It's usually among the first questions an EMT will ask. The purpose is to determine if your are mentally alert and oriented. The reasons for this assessment are to look for possible brain injury (concussion or worse) and also other causes such as intoxication with alcohol or drugs, low blood sugar, and other conditions that can cause mental confusion. It also has legal ramifications. If they judge you to be mentally incompetent, your right to make medical decisions for yourself is extinguished, including the right to refuse care (I'm assuming US law here, but most developed countries are similar).
This assessment has significant impact on the actions they take next. If you fail the test, they'll be wondering if your confusion is a result of injury from the crash or something else. Intoxication is always high on the list of possibilities, and so is low blood sugar. You would likely be asked if you are diabetic at that point, and they would probably do a finger stick to check blood sugar levels no matter what your answer. If your blood sugar is normal then they'll have to assume you've suffered head injury from the crash and expedite you accordingly. The smell of alcohol on your breath or signs of intoxication wouldn't change this course of events because drunks suffer head injuries too.