“And you shall do to them as they sought to do to others” (Devarim 19:19). Edim zomimim, plotting witnesses, are punished by receiving the punishment the victim of their false testimony would have suffered had they not been caught – but only if the court has yet to carry out its verdict. If the verdict had already been implemented before their lie was exposed, the edim zomimim receive no punishment, save for their disqualification from giving future testimony.
This law—“if they do not kill him, they are put to death; but if they killed him, they are not”—is not at all explicit in the Torah, and its rationale is never fully explained by our Sages (we discussed the approach of Rav Dovid Tzvi Hoffman here). This counterintuitive law served as a major battleground between the Tzedukim, Sadducees and the Perushim, Pharisees, with the Tzedukim arguing that the law is exactly opposite: that the only time we do punish the edim zomimim is when the victim has had his sentence falsely carried out. But if the edim are found to be zomimim beforehand, their only punishment would be their invalidation from giving future testimony.
This is a most plausible view and could explain why, most unusually, this view of the Tzedukim is actually quoted in the Mishna, granting it a degree of legitimacy, even as it has been rejected by the rabbinic tradition.
And rejected it was. “Rav Yehuda ben Tabbai said: ‘May I [never] see consolation [of Israel] if I did not have an eid zomim killed to disabuse the mind of the Sadducees, who used to say that edim zomemim are only put to death only after the [falsely] accused person has been executed’” (Makkot 5b). Rav Yehuda ben Tabbai wanted to demonstrate how wrong the Tzedukim were and thus, he killed an eid zomim before his testimony was acted upon. But in his haste he made a fatal error, due to another law of edim zomimim that is also not explicit in the Torah. "Shimon ben Shetach said to him: ‘May I [never] see consolation [of Israel] if you have not shed innocent blood, because the Sages declared that edim zomimim are not put to death until both witnesses are shown to be zomimim.’”
If witnesses come and testify that one, but not the other, witness was with them when the crime took place, that witness cannot be declared to be an eid zomim. Thus, by executing the one witness, Yehuda ben Tabai was actually, even if unwittingly, guilty of murder. Afraid he would make another awful error, “Immediately, Rav Yehuda ben Tabbai accepted upon himself that he would never rule on matters of Jewish law except in the presence of Shimon ben Shetach.”
Yet it is not as if Shimon ben Shetach did not execute people improperly. He "executed 80 witches in one day in Ashkelon”, whereas Jewish law allows a court to execute only one person on any given day. If one does not want to repeat a mistake, best to consult with others who also do not want to repeat the mistakes of the past.
Consulting with his co-leader (Shimon ben Shetach and Yehuda ben Tabbai were the third pair of the zugot, those who led the Jewish people in the last two centuries before the Common Era) may have helped moving forward, but did little to atone for the past. "All the days of Yehuda ben Tabbai, he would prostrate himself on the grave of that witness. And his voice was heard, and the people thought it was the voice of the witness” who had been wrongfully put to death.
Perhaps this was the same “voice” that was heard at the first wrongful death, that of Hevel. "And G-d said: What have you done? The voice of your brother’s blood cries out to Me from the ground" (Breisheet 4:10).
But Yehuda ben Tabbai argued that it was his own voice that all heard. The cries of those sincerely seeking forgiveness may be even louder than those of their victims. That it really was the voice of Yehuda ben Tabbai is demonstrated by the Gemara from the fact that soon thereafter, Yehuda ben Tabbai died and the voice stopped.
Yet that did not convince Rav Acha the son of Rava. He argued that it still may have been the voice of the deceased; the cries of the victim are louder than that of the penitent. While one who commits a wrong can put his life back together, such cannot be said for an innocent victim who cannot be brought back to life. Rav Acha suggests that once Yehuda ben Tabbai died and the heavenly court meted out justice, the crying could stop. Only the death of the perpetrator can bring some comfort to the victim. Such is the reality of life—punishing a perpetrator of wrongdoing brings a measure of closure to the victim. While this desire for justice is most understandable, one might have thought (hoped?) that such was true only in our temporal life—that surely in heaven, we would have no need to compare ourselves to others. Apparently, that may not be the case.
Alternatively, Rav Acha suggests that once he arrived in heaven, Yehuda ben Tabbai managed to appease his victim and thus, stopped the crying. Yehuda ben Tabbai’s explanation for his actions put a new perspective on what he did, and his victim forgave him, even in heaven.
Sometimes it is literally impossible to seek forgiveness while the victim is alive, as it is only after his death that one realizes a wrong was committed. While in such a situation, one cannot attain full forgiveness during one’s lifetime, one can—as the Ramban rules (Hilchot Teshuva 2:11)—gather a minyan, go the victim’s grave and confess one's sin. Perhaps it is this (most difficult) act that will allow for full forgiveness when one does arrive in heaven and comes “face to face” with the victim.
It is no wonder that in his one and only teaching quoted in the Mishna, Yehuda ben Tabbai teaches that one should “not make yourself like the judges' advisers; and when the litigants are before you, they should be like evildoers in your eyes; and when they are excused from before you, they should be meritorious in your eyes when they have accepted the judgment" (Pirkei Avot 1:8).
 Perhaps the reason he made such a mistake was because he was interested in proving others wrong, and not focused on the justice of his decision.
 This indicates that Yehuda ben Tabbai felt that he was, in reality, unfit to render halachic decisions. The norm in Jewish law (though such may have been not yet established in the second century BCE) is that out of respect to a teacher – and indicative that one is qualified to rule on issues independently—one is not allowed to rule in the presence of one’s teacher. Feeling unqualified to rule, Yehuda ben Tabbai wanted Shimon ben Shetach to vet all of his rulings.
 Maybe that is really so, but as long as we are on earth it is difficult—nay, impossible—to have a heavenly perspective.
 Not surprisingly, Shimon ben Shetach, whose son was executed when the relatives of the “witches” framed him, teaches in the next Mishna, "Examine the witnesses thoroughly, but be careful with your words, lest from them they learn to lie." Had he done so, he likely would have tripped up the witnesses and saved his son (see Rashi, Sanhedrin 44b, s.v. debaya michsha).