Your right about the system being designed a certain way and that's how it should work. The problem is that the state has so many more resources, and if you add flat out lying to the mix, the system breaks down. I'm of the opinion that since the state has the burden of proof and virtually unlimited resources that they should also be striving for the truth above all else. When it becomes more about convictions and less about justice, the system will fail to the detriment of all of society.
It is more important that innocence be protected than it is that guilt be punished, for guilt and crimes are so frequent in this world that they cannot all be punished. But if innocence itself is brought to the bar and condemned, perhaps to die, then the citizen will say, “whether I do good or whether I do evil is immaterial, for innocence itself is no protection,” and if such an idea as that were to take hold in the mind of the citizen that would be the end of security whatsoever. -John Adams
It is more important that innocence be protected than it is that guilt be punished, for guilt and crimes are so frequent in this world that they cannot all be punished. But if innocence itself is brought to the bar and condemned, perhaps to die, then the citizen will say, “whether I do good or whether I do evil is immaterial, for innocence itself is no protection,” and if such an idea as that were to take hold in the mind of the citizen that would be the end of security whatsoever. -John Adams