It does not, Randall is just parroting a popular misconception that torture works. In reality you will not believe that a sadistic person beating you up is gonna stop after you say a password, and the more are you beaten and drugged the less likely you are to say that password, and criminals, police, intelligence and other thugs know it, they just use torture because they like it.