Your point of view is, respectfully, oversimplifed. The real world is far more complex.
It also benefits people who didn't do the crime, but who have little or no practical way to prove they didn't do it/don't want to risk having a jury take a crack at it. Juries are fickle things out for blood, who watch the news and listen to politicians blaming everything on people "getting off" in the courts.... Juries also seem to not like personal injury cases as much anymore due to this crazy notion of "personal responsibility," which has nothing to do with an accident that statistically will happen to somebody.... Criminally, juries often have even less sympathy. People do "othering." "Othering," is where people place themselves on a petastool and look down on everybody else, juries are made up of people.... Do you see where I'm going with this?
The prosecution has: practically unlimited resources including the federal government to fall back on.
The defense has: practically no resources by comparison....
Forgetting that, there are some people the jury is just more likely to believe regardless of the truth or falsity of their statements. Do you stutter? Is the person saying you did it physically attractive? Are they well spoken and well dressed whereas you are not? Are they more organized? Is the person testifying against you a police officer and therefore likely to be believed any time.... Are there photographs or the lack of them?
"Making a deal" is a good alternative, keyword, "alternative."
You always have a choice, namely, you can go to trial.
If you take the trial, you're betting all in, you get nothing or hit harder.
If you take the plea, you're cutting it somewhere in the middle of all that.
The travesty is a criminal justcie system that operates on punishment rather than fixing the problem where possible/restitution/rehabilitation.
What's that? Something was stolen from you? Well we aren't so sure about getting it back for you or having you repaid for it, but we'll send the person who stole it to prison. No that won't get your stuff back or the money to replace it.... Problem not solved....