It's when you've become so, so hurt you hate the world, all the people who hurt you, and in torturing someone else you're getting revenge on the people who've hurt you, and it can be that you're mimicking what people have done to you, but in reverse. <br />
This applies more to bdsm type torture as opposed to military torture, but I suppose the same sort of pain/hatred effect to drive someone to make them feel better about themselves by torturing people as a profession.
It depends on what type of thrill they receive from torturing. Psycho/sexual torturing typically starts in adolescence. Such people associate harming another with a heightened state of arousal. Read about serial killers such as Jeffrey Dahmer and Ted Bundy, they started their desire to torture as adolescents. It is complicated how a sick mind works.
they feel empowered when they can hurt people.