Everyone has the right to a fair trial. Everyone has a right to life and liberty, too. Criminals, however, forfeit those rights when they commit crimes against their fellow citizens. You might as well say that the problem with jails and prisons is that they take away a felon's God given liberty.
This was addressed by Samuel Johnson in the 18th century; he said he would prefer to kill an attacker in the midst of his crime rather than swear the mans life away in court later. If you kill your attacker at the time there is not the risk of error.