First, being popular doesn't equal to being better, many tyrants have been popular, look at Kim Jong Un, his people adores him, look at the venezuelan case where former president Hugo Chavez was very liked by his people even though he managed to destroy his country's economy. What about Dzhokhar Tsarnaev (the responsible of the Boston bombings)? he has many fangirls and is definitely more popular than most scientists, does it mean that Tsarnaev is a better human than Bob the scientist who is working in a cancer cure?
Second, law exist for a reason, you are supposed to follow it all the time, not just when you feel like it, even if torturing prisoners truly made them not want to go back to jail, there is no guarantee that they are going to become good guys, maybe they'd be so scared that will opt for not leaving witnesses alive, what could have been a simple robbery, now becomes a murder because they are so traumatized that don't want to risk being caught