I did answer you. Once the intended target has been shot at, the person then is just someone else with a gun.
Indeed, someone else with a gun then started to shoot.
That is the consequence of lots of people with easy access to guns, good guy, bad guy, people in between, who want to shoot at others.
The really bad guy goes out intending to shoot people. Others, apparently good guys, want guns to shoot those bad guys. But those good guys are not necessarily always good guys. They can get angry and shoot people in cinemas over popcorn.
Meanwhile, justice is not served and random people with guns get to decide who was guilty and their sentence.
Your point is quite legitimate. The "good guy with a gun" might not be a good guy at all. He just might be momentarily acting on the side of the good guys. With ready access to deadly force, ordinary people who think they are good guys, and who genuinely intend to be good guys, can become bad guys in an instant, and they often do, which explains the US homicide rate. It's quite nuts.
Also, the good guy with a gun might very well be a guy with good intentions who misjudges a situation, and either hits an innocent bystander, or perhaps shoots someone in a case of mistaken identity. There's a part of me that cringes when I read a case like the Walmart carjacker case, because I know that in the USA, there are tens of thousands of people who read the story, and they want to be just like those good guys with guns, and in their zeal to be those heroes, somebody is going to be killed, and it won't be the right somebody.
However, I would disagree, at least partially, with your final sentence. When everything goes as intended, I think justice is served. Obviously, the legal process isn't observed, and if things had played out differently, a different sentence would have been handed down under the law, but I don't think the outcome in this case was unjust. Unfortunate, but not unjust. This carjacker guy had just shot a 16 year old girl, and another man, and goodness knows what his intention was next. I think it was a perfectly just outcome.
Also, it's true that the people on the scene decided who was guilty, but when they do that, all of their actions are subject to legal review. When they decide to use force, including deadly force, to stop the guy, their actions will be judged, and if they were wrong they will find themselves charged with a very serious crime. The law will decide who was guilty in that situation. Furthermore, it's really not accurate to call shooting the guy a "sentence". They didn't sentence him to death. What they did was stop someone who was a danger to innocent people. Because they are not professionals, we cut them a lot of slack in how they do that. If the guy ends up dead, that's not a perfect outcome, but it could be worse.