https://en.m.wikipedia.org/wiki/British_Post_Office_scandal
I suspect this also has its roots in the European legal tendency to presume guilt and the accused having to prove their innocence, far more than the system has also been poisoned with in the USA. It’s not perfect and getting worse in the USA, but in the past, it would have been incumbent upon the prosecution to prove you actually stole, not just that the system used indicated irregularities. For example there would have to be evidence of money transfers, exceptional lifestyles, video surveillance of stealing money, or at least witness testimony of some kind validating that money was stolen, etc. If something was stolen, it essentially has to be shown what happened to it, i.e., it was in the possession/control of the accused.
This scandal took place in the UK, though, not in a European civil code jurisdiction. The concept of "presumption of innocence" originates in English common law.
And that was made even harder by the massive and continuous perjury by the Post Office when it came to the robustness of the system