terrorists are not ordinary criminals. terrorists are illegal combatants. in the case of israel, terrorists want to destroy the entire jewish state. terrorists who were released in the past returned to terrorism.
would the idf release members of the islamic state, al queda, hezbollah. it is the case that in times of war, enemies who are captured are not released until the end of hostilities. in the case of enemies who commit war crimes and crimes against humanity, they are put in front of military tribunals and their cases are adjudicated in accordance with the nuremberg laws.