Perhaps it is the system's fault because it is not set to find the truth, but rather as a sports event between the defender and the prosecutor. Each one does their job and at the end, the winner takes all, whether for right or for wrong.
I have a friend who is a prosecutor and I had heard him talk about his work before. Everything he said was focused on winning. He was proud that he was able to dig out cases from the past where people went free, and then send them to jail. He was proud how good he was at prosecuting people. For all I know, he kept a score.
Is being so driven by the end goal a good thing? Sure it is, when you are prosecuting an actual bad guy. But, as it was my impression from my friend, it didn't really matter to him how bad the guy; all that matters is whether he can win. In that case, the system is at fault for allowing this kind of competition with human lives, but the individuals are at fault for playing the game.