Twice I’ve had cops ask to search my car, both were when I was young, maybe 18-19. I think both times were because the cops just assumed that as a kid I must be getting into trouble.
The first time is actually a pretty funny story, I was detained because the cop claimed he thought I had stolen property (I didn’t, and he had no good reason to think so) and he wanted to search my trunk. I refused, and he gave me the whole “If you did nothing wrong, you’ve got nothing to hide. Why don’t you let me search?” to which I responded because I don’t have to. Seeing as the car was registered in my father’s name, he said he could get his permission instead, and we had to actually call my dad, and the conversation was something like “I want to search the car your son is driving but your son is refusing” “What makes you think I’d say anything different?” “Sir, do you have any idea who you’re talking to?” “…Do you?” Then before he let me go, I heard him mutter under his breath “Damned Constitutionalists.” to which I quipped “Actually, I’m a libertarian.” It’s funny to think that I owned the cop like that, but it’s also disturbing that a cop is frustrated that a citizen knew his rights. I’m inclined this one was because one of the friends with me was black and we were all young.
A few months later, I was pulled over for doing something silly like 42 in a 40 with a couple other people in the car. The cop wanted to search my car claiming that he smelled marijuana. I told him that was impossible since I’ve never smoked it (completely true) so he must be mistaken, and I refused. He then called backup and they asked me to step out of the car and tried to get me out of earshot of the others in my car where he proceeded to make threats about how he knew I had drugs, they were going to search my car anyway, and when they found them I’d go to jail. At which point I yelled back to those in my car “Hey, you all heard him threaten me and that they’re searching my car without consent, right?” “Yup”. They searched my car anyway and, of course, found nothing. They tried to play it all off then, “Oh, well, we’ll let you off for speeding with a warning this time.” I tried to get their badge numbers, but they hurried got in their cruisers and drove away after that. I’m inclined to think this was because I’d just left a metal concert at a small club, and of course I was dressed the part in black and all, and it also happened to be Halloween night, so I guess the cop was bored (and an unethical ass) and figured some kids leaving a metal show on Halloween must be up to no good.
Either way, both of those incidents were when I was young. Since then, I have noticed that cops treat me better as I’ve gotten older, though driving around an older car got me pulled over about every 6-12 months, often for no reason. But since I got a nice car a few years ago, I’ve only been pulled over once, admittedly for going well above the speed limit that time, so the cop pretty much had to give me a ticket. So, at least in my experience in this area, it definitely seems like attempted searches, and perhaps just pulling people over in general, are probably profiled.