I'm not sure how it works in the US, but in Canada, and in particular, the province in which I practiced law, there are 2 basic reasons for plea deals from those who are innocent,
1. Acess to Justice: Competent representation costs money. A lot of money. A shit ton of money. A trial, with even a decent junior lawyer can easily run $25K. Lots of people don't have that and legal aid is difficult to get.
2. Incompetent Counsel: Even if you're "lucky" enough to get legal aid, you're not getting the all star team. You're getting an overworked civil servant that, from my experience, isn't that good. A plea is a quick and easy disposition.
When the Crown ( the Canadian version of the State) came to me seeking a plea, I always recommended a "no" because the fact they were coming looking meant they knew their case was weak. That being said, they could pay for my advice.
More often than not, the "powers that be" don't care if they have the right person or not, they care about looking like they're cracking down and doing stuff.