A critical flaw in our so-called "justice system" is that it is not, in fact, built for justice, but for revenge. It is built to punish those we feel have commited a crime. No, not even that - it is built to punish someone when a crime is perceived to have happened. It is not meant for justice. If it were a justice system, then the asswipes on Wall Street and the asswipes who started a war in Iraq for personal profit would long ago have been dragged through the system and justice handed down for their crimes against humanity.
No, we have a revenge system, so what happens is that the innocent are punished for crimes they didn't commit, so long as someone is punished and we get our emotional salve to soothe our pains and our consciences.
It's still a better system than many alternatives (e.g. tyranny), but Good Lord we need to pull our shit together and fix it.