This is an "Officer Safety" issue that may have far reaching implications on the reach of 4th amendment warrantless searches (Terry Stops).
Those are the magic words. All they have to do is say "officer safety" and the Fourth Amendment goes out the window.
The police were called out to my apartment a couple of years ago for a minor disturbance. When they got there, they asked if they could search the apartment. I replied that I did not consent to any searches and they told me that they could do a cursory search anyway for reasons of--yep, you guessed it--"officer safety."
The Fourth Amendment is a dead letter.