The use of torture to extract information is not a new idea. Under both Athenian and Roman law, slave testimony could only be taken under torture. Presumably the theory was that slaves were interrogated in order to get evidence against their owners, the owner had ways of putting pressure on the slave, so torture was needed to get the slave to tell the truth. In Imperial Chinese law, not only the defendant but also witnesses could be tortured. In that system, and I think also in some legal systems of medieval and renaissance Europe, a defendant could only be convicted by his own confession. Torture was one way of getting it.
The argument against torture, that the victim will say whatever he thinks will end it whether true or false, is also old—people in the past were not stupid. Our main source of information on Athenian law consists of orations written by professional orators to be memorized by a party to a law suit in a legal system where there were no lawyers and each party had to represent himself. There is one oration which claims that slave testimony under torture is perfectly reliable, that there has never been a case where it turned out to be false. There is another making the obvious argument on the other side, that such testimony is worthless since the slave will say whatever the torturer wants him to say.
They were both written by the same orator.
People in other legal systems that used torture were also aware of the problem. There is a collection of Chinese cases compiled in the 13th century for the use of magistrates. Many of them are cases where a clever judge realizes that an innocent person has been forced to confess under torture and figures out who is really guilty.
That raises an obvious question—if they saw the problem with torture, why did they continue to employ it? One answer is that extracting information might only have been an excuse, that the real purpose was to punish someone without having first to convict him. That is a possible explanation in some contexts, including the current case of torture by the CIA. But it does not explain contexts where the person being tortured was not the suspect but a potential witness.
A second possible explanation is the belief that a competent interrogator could distinguish a real confession from a fake one. That strikes me as the most likely explanation in the Roman and Athenian cases, where it was the defendant's slave, not the defendant, who was being interrogated.
A third explanation is that torture might produce information that could be checked. That is the situation in the hypothetical cases sometimes offered in defense of the use of torture—the suspect is being forced to say where the kidnap victim, or the terrorist time bomb, is concealed. More plausibly, to say where the loot is hidden.
One example of this approach occurs in the earliest of the surviving Germanic law codes. Under the law of the Visigoths, before a suspect could be tortured the accuser had to provide the judge with details of the crime that an innocent defendant would not have known. The defendant's confession was only accepted if it matched the details. If the accuser had made the details public, the defendant could not be tortured. How satisfactory the system was for the defendant would depend on how severe the torture was and how much permanent damage it might do to him, but it at least was a way of distinguishing a true confession from a false one. The same approach is used in modern law enforcement, where a confession is validated by the fact that it contains information only a guilty defendant would have.
Both the Visigothic and the modern versions depend on the honesty of the people conducting the interrogation. A policeman who extracts a confession by either physical pressure or the threat of additional charges can make it more convincing by providing the relevant information to the defendant in the course of the interrogation. That possibility is an argument for recording all interrogations and making the recordings available to the defense. That option was not available to the Visigoths. I do not know if they employed the period equivalent—trustworthy witnesses to the whole procedure.
One can offer theoretical arguments for legalizing the use of torture. The problem with such arguments is illustrated by the evidence in the CIA case. Even if there are rare situations where the use of torture would be justified, once legal it is not likely to be limited to such. It is risky to give government actors powers on the assumption that they will only be used when they should be. That mistake is sufficiently common to have acquired a label, at least among economists:
The Philosopher King Model of Government.