Mitigating factor
Political scholar Benjamin MacQueen writes that some Middle Eastern countries, like Algeria, give "mitigated sentences" to people who belong to terrorist groups or the insurgency (groups fighting against different governments in the Middle East.  These people get they death sentences cancelled, and their prison sentences cut by years or even decades, he says.  This way, the state and prison officials can look like they were doing nothing wrong; they were just letting people out early for behaving well in jail.  At the same time, the terrorists and insurgents could go back to fighting, and the states could support them without looking like they really were.