The Origin of the Law of Torture: A Cautionary Tale http://daviddfriedman.blogspot.com/2016/06/the-origin-of-law-of-torture-cautionary.html
The use of ordeals was eventually abandoned on theological grounds. A more careful examination of the biblical passages found little support for it, and it could be viewed as an attempt by humans to compel God to serve them, religiously dubious. In 1215, the fourth Lateran council rejected the religious legitimacy of judicial ordeals and banned priests from participating in them. Over the next few decades most European countries abandoned their use.
That left medieval judicial systems with the problem of finding another way of being certain a defendant was guilty. The solution was to impose a very high standard of proof, evidence “clear as the noonday sun.” Conviction required either two unimpeachable eyewitnesses to the crime or a voluntary confession. Circumstantial evidence, however strong, was insufficient.
In the history of Western culture no legal system has ever made a more valiant effort to perfect its safeguards and thereby to exclude completely the possibility of mistaken conviction. But the Europeans learned in due course the inevitable lesson. They had set the level of safeguard too high. They had constructed a system of proof that could as a practical matter be effective only in cases involving overt crime or repentant criminals. Because society cannot long tolerate a legal system that lacks the capacity to convict unrepentant persons who commit clandestine crimes, something had to be done … .(Langbein 1978)
The solution was the law of torture. Once the court had half-proof, one eyewitness or the equivalent in circumstantial evidence, the defendant could be tortured into confessing. A confession under torture was not voluntary, but that problem could be dealt with. Stop the torture and the next day ask the defendant if he is still willing to confess. Since he is now not being tortured, the confession is voluntary. If he doesn’t confess, torture him again