A man is accused of a crime. Is he guilty? Stick his hand in a pot of boiling water. If he is unharmed, God has proclaimed his innocence and protected him. If the suspect is burned, he's guilty and can be punished (further). This is the basic premise of the legal tradition of trial by ordeal, discredited since the Enlightenment. But was it an effective determinant of guilt? University of Chicago economist Peter T. Leeson says "yes":

How might these trials have worked, without divine intervention? The key insight is that ordeals weren’t just widely practiced. They were widely believed in. It’s this belief - literally, the fear of God - that could have allowed the ordeals to function effectively.

First, consider the reasoning of the defendants. Guilty believers expected God to reveal their guilt by harming them in the ordeal. They anticipated being boiled and convicted. Innocent believers, meanwhile, expected God to protect them in the ordeal. They anticipated escaping unscathed, and being exonerated.

The only defendants who would have been willing to go through with the ordeal were therefore the innocent ones. Guilty defendants would have preferred to avoid the ordeal - by confessing their crimes, settling with their accusers, or fleeing the realm.

The next thing to understand is that clerics administrated ordeals and adjudged their outcomes - and did so under elaborate sets of rules that gave them wide latitude to manipulate the process. Priests knew that only innocent defendants would be willing to plunge their hands in boiling water. So priests could simply rig trials to exonerate defendants who were willing to go through with the ordeal. The rituals around the ordeals gave them plenty of cover to ensure the water wasn’t boiling, or the iron wasn’t burning, and so on. If rigging failed, a priest could interpret the ordeal’s outcome to exculpate the defendant nonetheless (“His arm is healing well!”).

knowing that innocent people would be willing to plunge their hands into boiling water presumes that the innocent person is a believer. So someone of a scientific or philosophical mind would NOT be willing to plunge their hand into the water, innocent or not. So the system fails.

Of course, in those eras, such people were probably guilty of heresy anyway, so it probably didn't bother the judges much