We are missing an important piece of information here. Did the police inform the drivers why they were searching the cars?

If I'm pulled over and told they want to search my car, and only that, I'll inform them that they are welcome to search my nutsack with their tongues. If they say, "Hey handsome, we're lookong for a little girl in a red car, mind if we see if she is in your trunk?" Or "OMG, a bank just got robbed, can we make sure it isn't you?" Then I would likely comply.