IMO, GZ was only guilty of pushing his luck. While laws permit a non-LEO person to patrol territory and talk to people, this is not all that wise - GZ presented lots of evidence to that; it may be that his ordeal is not over yet, unless he leaves for Peru on the first airplane.
A LEO in the same position wouldn't need to explain why he was there, following potential burglars - it's his job. A LEO would be in real time radio contact with his partners and managers. A LEO would not need to shoot because he'd never allow a suspect to come behind him and so close. If it came down to blows, a LEO would be strong enough to defeat TM without killing him; an LEO carries a baton, and Taser, and handcuffs, and pepper spray in addition to the firearm. On top of that, any aggression of TM against the LEO would be illegal, short of some major violation of TM's civil rights.
This means that GZ should have left the policing to the police officers. They are better prepared, and their hands are less tied, and if they do kill a perp then they, barring an obvious crime, won't be facing the DA. This is the only thing, IMO, that GZ did wrong. Perhaps that gun under his belt made GZ feel protected, invulnerable. Such feelings are known to occur. An unarmed man will seek to avoid confrontation; an armed one may just barge in and have it all - just as this case illustrates.
This means that if you carry a firearm, your duty to avoid conflicts only gets stronger because it can easily escalate into a homicide. If you are wise and logical, like Spock, you may do good if you carry; but at every point make sure that your actions are not only legal, but also safe. For example, do not leave your car to go where you don't really belong (after strangers who, in your own opinion, are on drugs and up to no good.) However if a criminal tries to carjack you, or to break into your home, a gun will help because in these situations you have no other options - neither short term, nor long term.
Some lament that bad boyz need to be shot and killed by vigilantes, as it was common a few centuries ago. But the fact of life is that the laws do not permit that. The laws explicitly say that you shall fear criminals, and you shall avoid them. In some way it is wise because you do not know who is and who isn't a criminal. Only when someone breaks into your home you could be reasonably safe; but still check - it could be SWAT, after having house numbers mixed up again. The cost of shooting a person is very high; one might say that after shooting someone you might just as well shoot yourself, all things considered. GZ was this far ->.<- from getting an effective death sentence.