Some crazy guy in the crowd starts randomly shooting: what Law Level is this world? What are the law enforcement guys/robots going to do about it? In real life, such an incident results in several dead people, and if the PCs are the target of such an attack, assuming they're unarmored and the lunatic has an effective weapon, that'll be true in Traveller.
It's also a terrible example - how would such a lunatic, with such a significant chance of causing PC death, move the storyline along? If the intent is merely to show that the GM can take away a player character's life at any time, then I'd say that's a problem with the GM.
A robber trying to pickpocket them: this either succeeds (and the party doesn't learn about the theft until later) or fails and they give chase. Who says they pull automatic weapons and try to gun him down? Depending on the local Law Level, they'd suffer fire from the constabulary if they even draw weapons. But generally, such a scenario is either filler or leads to the next stage of the plot hook. (He runs them into an ambush, say, by the local crime lord, who needs the group to do him a favor. I don't like using such strongarm tactics all the time, but sometimes it can be a good adventure hook.)
Wild animal escapes from the zoo: This is really no different from an encounter with alien fauna (or ambulatory flora) on some world the party's landed on to refuel or trade. It can be nasty - even fatal, if it's a big enough or venemous enough creature - but usually not fatal. Animals, after all, are animals, and behave as such. Loud noises, distractions, and intelligent behavior by the PCs can defeat animals. Lion-like creature might be distracted at a critical moment by a holo-projection from the party member's wrist-computer or sometehing, say.
Bank robbers: The police had darn well better be careful. There are consequences for killing civilians, especially ones that have a good statistical chance of being TAS members or nobility. Bad things happening to Imperial citizens on worlds tends to attract the Imperium, which no local government wants. If it's the robbers who are opening fire wantonly, then the party might be in trouble, but this kind of random PC death is bad for the campaign (see comment about madman, above).
Drug dealers, mob boss boyfriends, and defective robots, oh my! These are all variants, in the Traveller combat system, of "I feel like killing a PC or two today for no reason other than to (a) demonstrate my own power or (b) demonstrate how randomly deadly the universe is or (c) both."
It's bad Traveller GM-ing from the get-go, because none of these situations, as presented, create a story beyond a short declaritive statement such as "Player A's character died today under the fangs of an escaped zooid."
However, let's create another situation, using the madman:
The world is C555644-8, and the party is in the most populous city (100,000 people). It's a fairly rough place (Law Level 4) and some people go about openly armed.
The party is chasing down the spare part they need in a rougher part of this town when the bricks and mortar next to them heads explodes in a shower of stone fragments. A sniper! Although he missed the PC [which he was not aiming for] the bullet has taken down a street vendor. A second round (the sniper's got at least a +6/+1 BAB) narrowly misses a PC [or if he hits, he doesn't kill that PC]. He's firing on the party!
The players had BETTER find cover! They'd better also be careful of the severity of their response or they may face legal problems, depending on the government type and/or the connections of the crazy guy.
However, if the players don't take cover and just stand there without taking action....well....kill some of them. Sniper + sniper rifle + human bodies = bad. They need to understand that.