That is absolutely not true. Torture works.
Whoever told you that was lying and it appealed to your sense of right and wrong, so you believed it.
It's apparent you have no personal experience in the matter.
No I have no experience in the matter
And just because our enemies do it is no reason for us to do it.