1. To find out who you are.
2. To decide if they should give you a ticket or let you go.
3. To try to get you to give them permission to search you and your car, or to get you to say something that gives them probable cause to search you and your car without your permission.
Whether it makes sense to answer a question or not depends on the reason behind that question.
If you refuse to answer the #1 questions, that is your right. They can then arrest you, and hold you until they can figure out who you are.
They cannot arrest you for not answering the #2 or #3 questions, and you should definitely not answer the #3 questions. Even if you never use illegal drugs or engage in any other illegal activity, a passenger may have accidentally dropped something in your car.
If you don't answer the #2 questions, you are almost certainly going to get the ticket for whatever they pulled you over for. If you want to get off with a warning, you have to give the officer some reason to not give you a ticket, and that's hard to do without saying something (especially if you were actually violating a traffic law).
-----
Justice Kennedy wrote, "While we recognize petitioner's strong belief that he should not have to disclose his identity, the Fifth Amendment does not override the Nevada Legislature's judgment to the contrary absent a reasonable belief that the disclosure would tend to incriminate him."