By itself, that seems like sunk costs to me - preventing someone else from profiting from a disadvantage they put you at does not necessarily remediate said disadvantage.
But there's certain ways in which it could be "rational" - e.g. preventing them from doing you harm again in the future by scaring them off with your revenge, evening out some sort of competitive position so that you are on the same level again, or if your revenge actually re-balances some material loss you suffered at their hands.
Are you familiar with the game-theoretic definition of a threat? A threat is when I say that, if you do X (which I don't want), then I will do Y, and Y hurts both you and me. (If Y benefited me, then we'd expect me to do Y anyway, so the threat would make no difference.)
Carrying out a threat is, therefore, always irrational. However, if I could make you believe that I would carry out the threat, then I could get you to not do X, which would be good for me.
If I can modify my own mind so that, if you do X, then I am obsessively driven to carry out Y—"revenge"—and I make this obvious to you, then modifying my mind in that way is rational for me to do. (Of course, the only key part is making you believe that my mind works like this. But as a species, I think humans are not especially good liars—probably for good reasons, so that threats and promises are possible—and the most reliable approach to making you think I'm like that is to be like that.) I think this is why there is a built-in drive for revenge.
Now, the drive for revenge doesn't always win. In the ancestral environment, carrying out revenge against the wrong enemy may simply get you killed. It's possible that "knowing when to back off" has been selected for. (Perhaps the neural circuitry sometimes perceived natural forces like rain, or stronger creatures like tigers (possibly the relevant evolving happened before we got good at hunting), as the "enemy".) Which then opens the door to trying to intimidate the other party even further so they don't try for revenge, or to bluffing that you're not intimidated, or to guessing (perhaps incorrectly) that the other side is bluffing, and so on.
I don't know what definition of revenge everyone is using, but if revenge means consequences for the perpetrator, then it could help the victim by sending a message to future perpetrators.
True. I realize that I wrongly assumed that "revenge" was retaliation perpetrated by the victim outside of any legal system.
If I understand right, some people consider that justice is a form of revenge. If the process of administering justice is done by a legitimate third-party, which lets the victim focus on healing/repairing, then I agree that justice will help the victim.
It could in principle, but in practice I think the situations where it would are very rare. If you discovered that coworker A took revenge against coworker B by sabotaging their project, would that make you more likely to deal with A fairly or just less likely to deal with them at all?
Sabotaging their project has collateral damage to the company and to everyone else who was involved with the project or depended on it—unless it was a one-person project that didn't really matter. Collateral damage to innocents is bad form.
If A's revenge took the form of damaging B's car (not while anyone was in it) and costing thousands of dollars in repairs... Well, it would depend on just what B had done to A, and what alternatives A had. But if B had previously inflicted the same magnitude of economic damage on A, and perhaps gloated that there was no way for A to prove it, then... I think the main thing I'd feel for A is respect.
Just like masks don't help the wearer, for a sufficiently tunnel-visioned definition of "help" and "things I care about".
(Yes, I know, masks aren't the perfect example because they do have a [smaller] prophylactic benefit to the wearer as well. But if they didn't, it would still be a good idea to wear them for disease containment, and "lol it doesn't benefit me" would be a dubious argument for the same reason.)
Let's say a man shot you. You don't want any petty revenge so you take no action and forgive. He now shoots you to death and the random occupant in your car. If only there was a way you could have signalled like a real life dislike button or a warning not to do it.