Torture is an organism that lives in the dark, it's done in secret and seems to be successful in staying as such. It's more successful in hiding when it's inexplicable. The fewer the (logical) reasons behind torture, the more your testimony will be difficult to believe and the more questions will be raised around your absence. Even from people who know you best.
This organism evolved the ability to live in the dark. From being part of the law in the middle ages to a rejected practice. So to survive, torture denies its own existence (read: torturers deny the existence of their actions) which is the best way to keep a secret and stay in the dark and avoid rejection (read: persecution/justice).
The ticking time bomb scenario is an idea that torture has spread to make itself less objectionable and thus nourishes it. Other more primitive ideas include deterrence.
Logically, asking 'why did they torture someone' implies that there can be an acceptable reasons for it to happen. Thus devoting part of our mental capacity to come up with excuses to make it less bewildering and thus less objectionable (like the ticking time bomb scenario). It's our nature, it's how our brain works. It tries to make sense out of things. This creates, unknowingly, a crack in our morality for torture to inhabit.
Do people ask why someone was infected with Polio? There is how, but the answer for why Polio isn't really an answer; it's either God or bad luck. People ask why HIV and got mixed up with how and created the stigma. Well you can ask Polio for why it picked someone to infect and the honest answer will be to self-propagate. The same thing with torture, any reason given is for self-preservation. I know this sounds absurd, but torture tries to propagate itself.