It’s not, but there is a lot of grey area and most police are trained to shoot first and ask questions later if they feel their life is being threatened. Most of the time police shootings are justified. The cases where they are not, well we all know the consequences of that 🙁
I should also point out that in almost every jurisdiction you can’t just be armed and walking the street, you need some kind of weapons permit. How easy that is to get depends on the state (and some states it’s almost impossible). I’ll use Florida as an example, you have to go through a training course and then an extended background check before you can get one.
Because somebody might get hurt
If driving a car is legal, why is speeding illegal?
Because the police is authorized to shoot anyone who might present a threat.
police are authorized to use deadly force against any perceived threat armed or unarmed
you could be carrying 19 guns and not appear to be a threat or you could be naked and appear to be one