Terrorists are trust-busters: they, too, want to kill, torture, and incarcerate. They seek to break the death cartel of governments by joining its ranks.
Thus, when a soldier kills terrorists and ("inadvertently") civilians (as "collateral damage") - it is considered above board. But when the terrorist decimates the very same soldier - he is decried as an outlaw.
Moreover, the misbehavior of some countries - not least the United States - led to the legitimization of terrorism. Often nation-states use terrorist organizations to further their geopolitical goals. When this happens, erstwhile outcasts become "freedom fighters", pariahs become allies, murderers are recast as sensitive souls struggling for equal rights. This contributes to the blurring of ethical percepts and the blunting of moral judgment.