Actually an eye for an eye was a call for mercy in its day, because in Mesopotamia at that time punishments were ridiculously harsh. Hannurabi was actually pretty forgiving and progressive for his time.
Deterrence - throw people in jail to discourage the populace from robbing banks.
Rehabilitation - give the criminal skills so that they will be cured of the urge to rob banks.
Incapacitation - Warehouse criminals so they can’t rob banks.
and lastly
Retribution - something that most of the legal literature takes a dim view of. (Not me though, at least entirely).
The plus one is “Restorative justice”. You work for reconciliation between the miscreant and his victims.
Anyway, yeah, two wrongs don’t make a right. But punishment can be appropriate for reasons other than retribution. In fact most legal theory either dismisses retribution or gives it a minor role. (Most legal practice may indeed be a different matter.)
Finally, there’s another virtue - taking ownership of your behavior. If you incite a stranger, there’s no reasonable expectation that the stranger has strong impulse control or even particularly values human life with certainty. Your friend sounds like at least a bit of a jackass. Maybe he will grow out of it though: one can hope.
In the 1988 presidential debates between Bush and Dukakis, the moderator tasked Dukakis, a long time death penalty opponent, what he would want to happen to a man who raped and murdered his wife. He waffled and lost the sympathy of the majority and it may have cost him the election
He was a putz, his answer was just further proof. The correct response was, “Of course I would want the raper and murder of Kitty to die, but that is vengeance and vengeance isn’t necessarily justice. The president of the United States must know the difference.”
Those examples are interesting, because they don’t “pay it back,” but, instead, “pay it forward.” Like, Paul punched me in the nose, so I’m going to go out to a bar somewhere and find some total stranger and punch him in the nose.
At very least, if there have to be two wrongs, the reprisal should be directly relevant to the offense!