There was enough pressure on Hamas from the rest of the Middle East nations to forge this deal and get the hostages out. Hamas was never going to respect the deal. They admitted as much. The hostages were returned and the terror prisoners were released. Both sides got something. Israel now is in a better position to wipe out Hamas and still forge an accord with the other Middle East nations since Hamas is clearly in the wrong and has acted against an accord forged with the Middle East Nations.
Hamas didn’t agree to any parts of the agreement beyond the ceasefire and hostage release. So now they die