About 98% of criminal charges are resolved with some kind of a plea bargain.
According to The Innocence Project, 10% of the cases that they've worked on in which a person in prison has been subsequently found not guilty was a person who took a plea deal.
It's been estimated that nation wide, 15% of the people who have been sent to prison and eventually exonerated took plea deals.
There are rare cases in which cops do actually torture people into confessing to a crime that they didn't commit; but, most often, that's not what happens. Usually, they try to get people to hedge their bets. They tell the accused that they'll be facing three times the sentence if they try to fight than they would if they take the plea deal. There have been cases wherein plea deals were offered with assurances that charges wouldn't be pursued against friends and family. There have been plea deals like what happened to Brian Banks, who was innocent of the rape charge, but, his own lawyer told him that the jury would see a big, strong, black teenager and believe that he's guilty.
I'm not sure that I can say that plea deals shouldn't be a thing - some people have made those arguments. Still, it's not hard to imagine a clearly innocent person taking the bet that the prosecutor will be scrupulous, the defense will be competent, and the jury will be objective and getting fucked being that it happens all the time.
Still, there seems to be a lot wrong with how we handle plea deals and we're clearly pressuring a lot of innocent people into waiving their constitutional right to a trial and taking prison time.