We all want to believe that the system works, guilty people are convicted, innocent people are not. That is true most of the time, and there are legal systems out there far worse than ours, ask Brittany Griner about her experience with the Russian legal system.
While our system has a lot going for it, it is far from perfect. I have worked in it for 27 years. I have seen a lot of tough situations, serious crimes, families in crisis. Most of the time in criminal court I have seen the guilty held responsible for what they did, and those who are not guilty let go. That being said, I have seen too many cases where those who are not guilty of a crime are arrested and prosecuted. Fortunately, in the cases where I have represented someone that I knew was innocent I have been able to win at trial. That does not mean that my clients had no consequences, they were accused of a crime, sometimes arrested, and jailed for a couple of days. Being accused of a serious crime often involves loss of employment, business customers, bad media coverage, and reputation damage. Having your name all over the media accused of a crime is a miserable experience.
All of that being said, it is much better to win your case after a false accusation, than to be convicted of something that you did not do.
I have attached a link to an article about Adnan Sayed. Mr. Sayed was convicted of a murder that he did not commit in 1999 in Baltimore, Maryland. He was just released from prison in October of this year. His case has been extensively written about, the article gives a good summary of what went wrong. Police investigators quickly zeroed in on one suspect, Mr. Sayed, and did not explore others. Prosecutors went along, focusing on Mr. Sayed, assuming that he must be guilty. Even after evidence came out that he was not guilty, prosecutors and investigators did not want to admit that they were wrong, they doubled down on their mistakes. The situation was made worse by Mr. Sayed having an attorney with a good reputation, but, a terrible courtroom performance, she was disbarred shortly after she lost his trial. There is a common theme in wrongful conviction cases, inability to admit fault, that a mistake was made. Many people have been convicted, and imprisoned because investigators, prosecutors, and judges did not want to admit that they made a mistake, instead of looking to do justice they tried to cover up their mistake. Someone falsely accused in that situation needs to hope for a good attorney, a good jury, and some luck, or they will be in serious trouble.
At the end of the day Mr. Sayed lost over 22 years of his life in prison. None of the investigators, prosecutors, or judges who mishandled his case saw a single day in jail or any punishment at all for what they did.