It’s impossible to know how many false convictions have happened over the years. The justice system is set up to avoid these when possible, but it’s well known that they do occur. Many people have likely served long sentences when they did nothing wrong at all.
Part of the reason that we now know this is because of the rise of DNA evidence. Because DNA can be analyzed and linked to one specific person, it is often used to overturn false convictions after the fact. Groups like the Innocence Project have analyzed the statistics and determined why these false convictions tend to happen.
What the Innocence Project claims is that, in the “overwhelming majority” of these overturned convictions, at least part of the reason for the initial conviction was an inaccurate eyewitness testimony. Perhaps the eyewitness picked the wrong person out of a lineup, maybe they gave inaccurate accounts to the police or maybe they were even brought into court to testify during the trial, when they made mistakes and accused the person of something that they never did.
In many cases, the eyewitness is not trying to do anything wrong. They do honestly believe that they are telling the truth. But they could have an inaccurate memory of the event.
For example, memory often changes with recall. If that eyewitness has been telling their story to many different people, listening to news reports, talking to other witnesses and the like, their memories of the event could have changed. They may not know that this has happened, and it can lead to these inaccuracies in their testimony.
False convictions do happen, and they’re one of the reasons that those facing criminal allegations must understand all of their defense options.