You’re assuming that the cops percieve you as a threat and are guaranteed to kill you no matter what you do. I won’t deny that’s happened but its very far from the norm. In a lot of cases the cops are stupid, or negligent or scared and prematurely react without foresight. Add a civillian possessing a gun and and flagrantly threatening to use it and you turn a situation that could be disarmed into a inevitable violent conflict.