To play a bit of the side that is counter to the arguement that it shouldn't be necessary, having that law can help prevent an officer from say drawing and firing on someone who happen to have no desire to do any harm to the officer, but they had their wallet right next to where their pistol sits and in the darkness of the twilight the motions can be mistaken as drawing said pistol rather than pulling a wallet out. Yes an officer shouldn't make that kind of mistake, but the officer is still only human and is still capable of misinterpreting a situation.
It does not prevent that. In fact it heightens the alertness of the officer, increasing how quick they will be to draw over a perceived threat because they have just been informed of a deadly threat.
Without the requirement you also have the option of informing if you feel in a specific situation it will reduce the chance of a misunderstanding.
That can be a good choice, if going for your wallet will uncover it, or a LEO will be patting you down and discover it.
If however you are pulled over for a routine ticket, the officer is feeling out the situation, then you inform them of a deadly threat to their safety they would have never even known existed, it places you in greater danger.
You would have never exited the car, the gun is secure and out of sight, and they would have never known about the gun, but now you have put the gun directly on their mind, and the thought of that gun will be quite active in their mind the entire time they are dealing with you.
That did not increase you safety, it actually decreased your safety.
Yet it never increased the officer's safety because if you were a bad guy that was going to use it you wouldn't have told him before using it.
So it puts you in more danger, and doesn't put the officer in any less.
There is similar situations. Say you are a good samaritan, or a witness to another crime, or giving a statement of an event you are not directly involved in, or...
Cops come, they are not focused on you at all, they don't care about you, they are dealing with the criminal if they are present, focusing on the criminal and victim or those directly involved, fact finding, and trying to gather the details. You and what you are doing would be the last thing on their mind.
Suddenly you inform them as required by law that you are carrying a lethal threat.
You go from being nobody on their consciousness to very prominent. Out of some crowd or group of people you become one of those they are most aware of. What you do, how you move.
Did it increase your safety? No. Quite the contrary.
Would it have increased their safety if it was a bad guy? No.
In all honesty it might even decrease their awareness of other threats because a larger percentage of their attention is on you than otherwise would be, even when dealing with other people.
It should not be a legal requirement, it should be a discretionary voluntary thing. Something you do based on the situation, whether they will run across it or see it or may see it at some point during your contact with them. Not every time all the time, putting them on high alert for no reason.