It was almost serendipity that various interests came together in a way that led to former Alaska Sen. Ted Stevens having his corruption convictions set aside. Besides the FBI agents (there are some decent ones) deciding to snitch on the prosecutors, whose conduct does look (pending further investigation) intentional and beyond the pale, Eric Holder had motive as well. He obviously wants to let the Justice Dept. know there's a new sheriff in town, and by doing it in a way that sets aside the conviction of a senator from the other party, he creates the impression of integrity.
Of course Ted Stevens, who would likely have narrowly won reelection without the conviction a few days earlier, is out his senate seat, but the corrupt SOB (the worst corruption in politics is that which is open and legal and this guy was an unabashed porker who bragged about it) deserved it. When I was in Washington in the 1970s a friend of mine went to work for him and he used to tell me stories about just how shamelessly Stevens went after federal money back then for any project that could enhance his standing and career in Alaska.
As this Register editorial notes, however, prosecutorial misconduct is much more common than we ever know about. Prosecutors are judged by their wins, and they cut corners all the time. Not sure I have a solution, except perhaps to go after them personally (which almost never happens even when it's uncovered and disbar them or charge them criminally. But the "justice" system is such an inbred fraternity that seems unlikely too unless somebody has more to gain by looking honest, as Holder did in this instance.