From a secular perspective, killing a terrorist is worse for the terrorist than temporarily torturing him to extract information. If you kill him, he ceases to exist. If you temporarily torture him, he recovers. He suffers far less harm from temporary torture than death–which is permanent and total harm. Yet secularists don't generally think it's ipso facto wrong to kill a person.