That being said, prosecutors are humans, and often-times egotistical, political, cynical, and more than occasionally vindictive humans with all that entails. So, it is hardly uncommon to see rules already stacked in the state's favor bent or broken.
Trials are virtually extinct in the USA. With few exceptions, if you find yourself going to trial, you are not in a good place. While good lawyers should be trial lawyers and unafraid of trying any triable case, the vast majority of the time if you are getting off, you are getting off pretrial with a dismissal or deferred prosecution agreement. If you lose on pretrial motions and the state is intent on prosecuting, then most of the time if your attorney can get you a deal and recommends that you take it, then it's a choice between pride/"truth" and rolling dice loaded against you and paying for it big time.
While in principle as a defendant you are not supposed to be punished for taking your right to go to trial, the plea system punishes you heavily, and if you refuse to "take responsibility" by admitting guilty (the earlier the better) and expressing remorse, then you get punished even more post-conviction, with a heavier sentence, and then certainly being denied parole if that is available in the state system.
http://www.washingtonpost.com/news/opinions/wp/2014/01/30/7t...
PS: Absolute immunity protects from both criminal prosecution and lawsuits, so in general they can at worst be fired possibly disbarred. http://en.wikipedia.org/wiki/Absolute_immunity
As for the prosecutor themselves, defendants or judges can and do refer misconduct to bar associations which can and do disbar prosecutors. Judges can directly hold prosecutors in contempt and fine or jail them in extreme cases, or refer them for criminal prosecution on charges ranging from perjury, obstruction of justice, official misconduct, and criminal contempt and so on. As with any criminal cases involving criminal justice professionals, this is quite rare, but it does happen, and absolute immunity is no barrier to it.
As to fairness itβs considered completely reasonable for an innocent person who is a possible flight risk to spend a year in jail awaiting trial.