It holds a lot of truth.
Effectiveness of torture for interrogation - Wikipedia
A person under torture simply tells you
what you want to hear (to make the pain stop). If you want them to tell you they're a witch, or an infidel or whatever, then they'll admit to that (regardless of if you did it or not) to make the pain stop. They will tell you what they think you want to know, in order to make you stop.
IRL, every person burnt at the stake after 'confessing' to witchcraft admitted said witchcraft under torture. Seeing as witchcraft doesnt exist, that's saying something.
....
Nah I meant something different, although your example is a difficult one.
See it like with the suspected witch, who obviously - to a nowadays person - is innocent, because there is no thing like magic (scientifically). Therefore she cannot be a witch, even if she thinks she is one. The only possibility for her is, to lie (knowingly or unknowingly) to end the torture.
Obviously the torture did not extract the truth in that case, despite the torturer believing it did (back then it was assumed that there absolutely is witchcraft).
You have to bring different cases to discuss the possible truth-extracting properties of torture.
It is a estimation of values for someone under torture:
E.g. someone is subject to some civilized western justice system, no one is going to torture him (at least physically). He is a tough criminal who can sit out a few days in prison, where he is treated correctly and gets food etc. and has access to a lawyer.
Now he is interrogated (only verbally by the inspector) for a crime which he did in fact commit, but he knows, that if he keeps silent, the police does not have enough evidence for a conviction.
Of course he does keep his mouth shut in this case.
Take a different system e.g. a system where he might be subject to light torture e.g. the police gives him a beating during interrogation and the food in prison is bad and if he would get convicted the prison could not only cost him his lifetime but also his health. Here things are on the edge: is the torture hard enough so he confesses?
Take a fiction system, a bit different, take the (relatively) good prison conditions of the first case, but make the torture more severe eventually leaving permanent damage or even mutilation. In this case the criminal would confess, so torture in a way absolutely did its job.
You can construct all sorts of cases like this, and it comes down to a calculation of values for the torture victim, what is to gain vs. what is to lose, are there loved ones in danger by talking/not talking, is a merciful quick death to be expected instead of endless pain etc. etc.
The interrogator has to interpret whether the information he gets out of his subject holds truth or not.
But I bet, depending on the severity of a torture, there is a point where almost every individual breaks.