“The witnesses do not become zomimim, ‘plotting witnesses’, unless they falsify themselves” (Makkot 5a). The law of edim zomimim is a unique subset of invalid witnesses. In a “standard” case of contradictory witnesses, one set of witnesses claims Reuven killed Shimon and a second set testifies that Reuven (or for that matter, Shimon) was with them at the supposed time of the crime.
Having no way to know which set of witnesses is telling the truth and which might be lying, neither set of witnesses can be accepted; and absent other evidence, the accused would go free. In a case of eidim zomimim, the second set of witness says nothing about Reuven or Shimon. Rather, they claim that the first set of witnesses was with them at that time of the supposed crime and thus, they could not have witnessed it. It could very well be that the Reuven did indeed kill Shimon, but these so-called witnesses were actually with us.
However, here we do not throw the case out, not knowing whom to believe; instead, we accept the testimony of the second set of witnesses. And instead of just disqualifying the original witnesses from giving future testimony in a court of law, they are given the exact punishment they had intended to inflict on Reuven—i.e., in the above-mentioned scenario, they themselves would be put to death. Unlike one who shoots but misses, these witnesses are put to death for “attempted” murder. This would be so even if a third set of witnesses came along to give uncontested testimony that Reuven did indeed kill Shimon. In such a scenario, Reuven and the original witnesses would be put to death. Undermining the court is a most serious crime.
What is far from clear is why, in a case of edim zomimim, do we believe the second set of witnesses more than the first? Here, too, we have two sets of witnesses contradicting each other, with apparently no way of knowing who is telling the truth. How and why is this any different from the case where the witnesses are debating where Reuven was at the time of the murder, where niether set is accepted?
It was this difficulty that, at least according to one view in the Gemara, led Rava to assert that the witnesses are only invalidated from the date the second witnesses come, but not from the time they claimed Reuven killed Shimon. “Eid zomim is a chidush, a novel law. For it is two [witnesses] against two; what do you see to accept these - accpet those! Therefore one only has from the time of the chidush" i.e. the testimony of the second set of witnesses" (Bava Kamma 72b). And yet, of the hundreds of disputes between Abaye and Rava, this is one of only six cases where the halacha follows Abaye and hence, the edim zomimim would be disqualified retroactively. Why is the testimony of the eid zomim so utterly rejected and turned against him?
Furthermore, the law of edim zomemim only applies if they are found to be false before the court actually announces its verdict. But once the verdict is announced and Reuven has been executed, even were 100 witnesses to testify that the first set of witnesses was with them Monday at 3:00 pm, no punishment is given to this first pair of witnesses. How might we explain these seemingly baffling laws?
Rav Dovid Tzvi Hoffman, the great 19th and early 20th century German rabbinic authority, puts forth the following fascinating interpretation (Melamed LeHoeel, #101). He notes: "There is almost no one in the land who does not have friends and enemies". When one set of witnesses says that Reuven was the murderer and another set says Reuven was with them, thereby providing a ready alibi, it might be the first set is telling the truth and Reuven really is a murderer. The second set is trying to save their friend—and are willing to lie to do so. Alternatively, the second set of witnesses is telling the truth and Reuven is not guilty. However, the first set hate Reuven so much they are willing to lie to have him killed. We just don't know who is telling the truth, so neither set of witnesses can be accepted.
However, when the second set of witnesses says nothing regarding Reuven and testifies regarding the witnesses themselves, it stands to reason that they, the second pair, are telling the truth. If they had wanted to save Reuven, they had a much easier route. All they had to do was to testify that Reuven was with them Monday at 3:00 pm. In such a case, no matter what transpires afterwards, Reuven cannot be executed. By testifying against the witnesses, it is still possible that Reuven will be found guilty by a third set of witnesses. So clearly, their testimony has nothing to do with Reuven.
But perhaps they hate the first set of witnesses, and are willing to lie to have them killed. Such a scenario, Rav Hoffman explains, is most unlikely. While everyone has enemies, the chances that two people would hate both witnesses—the laws of edim zomimim require that both witnesses be found lying—is low indeed.
Even in such an unlikely scenario, there is a much easier route to harm them. The second set could testify that the first set of witnesses themselves had killed someone, or even that they committed some other crime that carries the death penalty. By carrying out such a plot, they would have the witnesses killed and Reuven, too, would go free. There would be no reason to lie and say the witnesses were with them.
However, once Reuven is executed, these arguments no longer are valid. Here, it is very possible the second set of witnesses were good friends of Reuven, and are willing to lie to avenge his death. Their testimony that the witnesses were with them accomplishes that – but in such a scenario, there is no reason to believe the second set of witnesses over the first. There is good reason to suspect they may be lying.
Furthermore, extending the laws of plotting witnesses to post-execution would destroy our justice system. No witness would ever be willing to testify in a capital case. There would always be the fear that some disgruntled friend of Reuven would come and make up a story that the original set of witnesses were somewhere else on Monday at 3:00 pm. It is only when and because of near certainty that the first set is actually lying that they can be given the punishment intended for others they meant to harm.
Edim Zomimim may be a chidush, but it is one with much to support it.
 He was also a great Bible scholar and wrote the first detailed response to the findings of Biblical criticism. From the time of the Ramban (13th century) onwards, it was most unusual for the great Talmudists to also write biblical commentary. That changed with the Enlightenment and the attacks on the unity of the Bible. In addition to Rav Hoffman, other giants of halacha who wrote major works of parshanut include the Meshech Chochma and the Netziv. While not quite in the same league halachically, other “moderns” who wrote major biblical commentary linking the written and Oral Law into one unified whole included Rav Yaakov Tzvi Mecklenberg (HaKetav vehaKabalah) and the Rav Baruch HaLevi Epstein (Torah Temimah). Deserving of its own category and unparalleled in scope is the Torah Sheleimah of Rav Menachem Mendel Kasher.
 This is what we might call a miggo, a legal principle where we believe someone because if they were going to lie, they could have told a much better lie.
 And hence, according to a second view in the Gemara, Rava actually agrees with Abaye that the edim zomimim should be disqualified retroactively, but does not rule that way in order to prevent total havoc to our justice system. Imagine the chaos if they had been witnesses to a get between the time they claimed Reuven killed Shimon and the time they were caught.