Because the officer is a jack booted thug and your friend is a god loving, flag waving patriot who's only crime is exercising his God given right to self preservation. That really is what you wanted to hear. That's usually the answer that, "Hey, let me ask you a question about my friend...." is looking for.
In my state I have the authority to temporarily take custody of the weapon for my own safety. That's it in a black and white nutshell, period. Do I ever do this? Rarely. In fact, I can't remember the last time I did. If I'm taking a weapon off you we've typically gone to a whole new level. The only thing CCW holders ever make me do is scratch my head. When we have contact with each other don't act like a panicked deer in my headlights and scream, "I have a CCW!" You'd be surprised at how often that happens. In the same vein, just because we're both packing heat doesn't mean we're in the same club. I have no desire to have a bromance about your rod. If your state requires you to divulge that information than do so calmly in a matter of fact way. If not then just keep it to yourself. After all, I assume everyone has one anyway.
When I go to work I run into a lot of ass holes on both sides of the badge. Why? Because we're all imperfect human beings not automatons. As the saying goes: you can be part of the solution or part of the problem. When you have contact with law enforcement decide which one you want to be.