It happens in noncapital cases, too, though. A conviction is set aside, and no new conviction is obtained against the defendant. There are many reasons consistent with guilt why this can happen. Essential witnesses may be dead. Evidence may be suppressed for reasons other than its reliability. In noncapital cases, the defendant may have already served most or all of the prison sentence that could be obtained, so no additional criminal sanction is available or needed, so the prosecutor may just drop it.
Despite all this, there is frequently a PR campaign declaring the defendant "exonerated" with the implication that he has been proved innocent and scathing condemnation of the criminal justice system. Sometime, to be sure, actually innocent people are convicted, and sometimes condemnation of actual misconduct is warranted. But sometimes the "exonerated" defendant actually committed the crime. Sometimes the defendant actually committed part of the crime. Michael Armstrong, former Queens DA, has an article in the WSJ, Persistent Myths in the Central Park Jogger Case.
The panel's report to Police Commissioner Kelly in 2003 suggested that it was "probable" that the defendants participated only in a preliminary "hit and run" attack on the jogger, similar to the other assaults for which they had been convicted. If that theory is correct, it seems clear that they served excessive prison terms. Others, pleading guilty to such offenses occurring on the same night, served two to three years, not six or 13.
Perhaps it is fair, though not required as a matter of law, to compensate the defendants for their extra prison time. But some thought should also be given to the blameless police officers and assistant district attorneys who, as a result of a well-orchestrated publicity campaign, have been subjected to public vilification, anonymous death threats and petitions calling for them to be fired.