They don’t know that though. Really the problem comes when it’s a “surprise” gun. I almost got killed when we got stopped and I forgot there was a gun at my feet (rear seat passenger), then I kicked it on accident, which drew the cop’s attention, which made him freak out, and there was a lot of yelling and a lot of me keeping my hands where he could see them and eventually all was calm. It’s way better for everybody if everybody is on the same page and there are no surprises, recent evens in PA not withstanding.
That is the whole point with cops going crazy because they see a gun.