What made torture "work" in 24 is that Jack Bauer can't trust anybody else and never has more than one lead to follow at a time. Even though he talks to dozens of people who know parts of the big conspiracy, these people all magically disappear but only do so moments after they tell him one key bit of info that will lead him to the next clue. Sometimes they disappear by escaping custody, sometimes they disappear by being killed by the bad guys (or a traitor among the good guys), and sometimes they kill themselves. Through repetition of this pattern, we come to expect that each person who becomes the focus of Jack's attention will have some key bit of info he just has to get out of them. And he has to get that info from them now because he if he doesn't he'll never see them again.
Real life doesn't work that way.
In real life you have dozens, hundreds, or thousands of possible leads at any given time. Because the bad guys aren't supernaturally good at their job, you can go back and ask followup questions. You can check one guy's testimony against the next guy's. And some of the people you think seem like pretty good leads don't know anything useful. Torturing those people will generate false leads which lead you to torture more people who generate more false leads until your entire organization is in the business of serially torturing innocent people until they tell you whatever you seem to want to hear rather than the business of finding out the actual truth.
Each person you torture into generating false leads makes it more likely people will die because it ties up your organizational resources. It also is likely to generate massive blowback - some of the people you torture become or inspire new enemies, whereas people you are nice to might become friends and voluntarily help the investigation.