He didn't get popped because he was lacking, he got popped cause he was banging. Bangers don't go around looking for guys without guns to shoot, generally they're shooting other bangers.
You really having trouble thinking of scenarios where having a gun gets a dude shot?
Dumbfukk is a little kid and ignorant about guns, shoots himself with it.
He has a gun, so he goes out to put in work with it, gets in some gunplay and gets shot instead.
Gets in an argument, wants to look tough so he pulls heat on a dude, one of that dude's friends caps him.
Gets in an argument with a dude, other dude gets pissed off and pulls out heat, instead of talking him down or walking away the little kid tries to pull and gets himself shot.
Someone covets his gun and kills him for it.
Gets in a fight, would just be a fist fight but he has a gun, other dude gets his gun and shoots him with it.
Caps someone, gets capped later in return.
Every single one of these things happens in the hood, so don't even try to start talking like any of them unlikely.