Okay, let’s look at a hypothetical:
Suppose there is a nuclear device hidden in a city. You have captured one of the conspirators, He has admitted to being a part of the plot. He admits that he knows where the device is hidden and that it will detonate within a couple of hours. But be refuses to divulge the location. The city contains several million people and complete evacuation is not feasable. Do you torture the person in the hopes of obtaining the location, or just let the device explode and kill millions and make the city uninhabitable for decades if not centuries. Your family lives in the city, by the way.
I would argue torture is justified.
Further, I would argue that anytime a person is imprisoned for years for commiting a crime, that could be thought of a mild turture.