To shoot you, he has to make a loud noise that attracts attention, something that he doesn't want. While he is choosing whether to pick up the wallet and get out of there or start shooting at you, you are putting important distance between the two of you. If he shoots, he's probably going to miss. If he doesn't miss, he is probably not going to hit you in a vital spot. If he hits you in a vital spot, you are probably not going to die.
Few robbers are good shots.
And most of them just want your property so they can get more drugs. They don't really want to boost their odds of going to prison for years by shooting you. So give the criminal whatever he asks for wallet, keys, jewelry, credit cards or whatever. Your life and health is more valuable than your possessions. And even a short stay in the hospital costs much more than whatever you're carrying on you.