In extreme cases, say if a terrorist is arrested and is suspected that have hidden a nuclearbomb that is about to go off?
The one major complaint about torture is that if you’re tortured you’d say what you think the torturers want to hear to make it stop, so its not reliable information.
But in the case above its easily verifiable and for an important cause.