The Gaza war was intended to impose substantial costs on Hamas and to deter further attacks on Israel. It achieved both; e.g., attacks from Gaza are down since the war. The same regarding Hizbullah and the 2006 Lebanon war: Look at the northern front and how quiet Hizbullah has been, and how weakened the recent elections showed it to be in Lebanese politics. Oslo didn't work; unilateral withdrawals, both in Lebanon and in Gaza, gave land but didn't bring peace. The status quo is not great for Israel, but it's tolerable. Risk aversion says keep relying on military power.