Was I able to assist you with understanding revenge?
Absolutely not, sadly, you just confirm that it has no meaning what so ever. There is a risk (a rapist) that committed a crime (a rape) it makes the elimination of the reoccurrence (a second rape) only possible if said risk is hedged perfectly which is only 100% guaranteed, no pay back, no kick back, no what ever escape by death.
Your perfect hedging would require the destruction of mankind to prevent all future rapes.
You assume that a freak occurrence at time X, "the rape", would help you forecast future occurrences of other rapes. Are you an economist by any chance? There might be real-life trends, such as a disproportionately high number of serial rapists in the statistics, which suggest that there are additional factors involved, but you're only able to identify those trends by analysing
what was. In the scenario you've given, there's no information to suggest that one rape changes the likelihood of the same person committing future rapes.
Analysis of multiple rape crimes might reveal some more trends. But it could also reveal that various other people who are statistically "at risk" never commit such crimes, or that some actual rapists would have been considered "low risk".
Although there often seems to be an
element of prevention, and people may say "this person is very dangerous, so he should be locked up for a long time", pure prevention is not sufficient to describe the practical reality of justice. Due to the existence of those "other factors", the earlier assumption is unsound.
So that just leaves a few other options like rehabilitation and restorative justice.
Rehabilitation might include something like education to reduce those other factors. I think revenge is also a factor that fits here. For example, prison might be unpleasant and generally designed to make the prisoner feel some of the pain that their victim felt -- and that could be educational.
There is also an emotional element. The public at large is represented by the state, and they also want to feel safe, even if they're irrational or not very smart. And the rest of the public also wants to feel safe, hoping that they won't get caught in the cross-fire if the irrational group is disappointed.