You shall not take revenge…
— Leviticus 19:18
The 13th-century Talmudist, Rabbi Aharon HaLevi of Barcelona, explains:
One of the roots of this commandment is that a person should know in his heart that all that happens to him, whether good or bad, is because it is G‑d’s will that it happen to him... It was G‑d who wished this to happen, and one should not consider taking revenge from the other person, because the other person is not the reason for what happened.
Rabbi Schneur Zalman of Liadi explains in his Tanya that while the person wronged needs to forgive, the person who did the action is still held accountable, for “G‑d has many agents” through whom He can act.