Classical explanations of conventional wars run something like this: An aggressor state seeks political advantage through military force. It has a hunch that the threatened target will likely either make concessions to avoid losing a war, or, if war breaks out, the resulting political gains will be worth the military costs to achieve victory.
Wars then are prevented only by a balance of power and military deterrence: aggressors have to be warned that it would be stupid to start a war they will likely lose. If there are miscalculations or if emotions run high and logic is ignored, then the resulting conflicts only end when one side loses and has no choice but to accept the imposed terms of the winner.
That being said, the modern therapeutic West has either forgotten such rules or ignored them. In today's globally televised wars, a novel doctrine of proportionality reigns. It is sort of like T-ball in which scoring and winning don't matter. Instead both the stronger and weaker sides end up the same. Little attention is paid to who started the conflict, how it was conducted or how it should be ended.
In terms of the Middle East, contemporary T-ball war works out like this: A far weaker Gaza sends a shower of missiles into Israel, hiding its launchers among civilians to ensure collateral damage and favorable propaganda during Israeli retaliation.
Israel, with its technological savvy, knocks down most of the incoming rockets, but then retaliates inordinately to the aggression by killing far more Palestinians in Gaza than it lost inside Israel. That is considered unsportsmanlike play. In a fair T-ball fight, Israel should have stopped the war when the losses were equal and not tried to run up the score when there should be no score-keeping at all.
Apparently Israel was supposed to shut down its Iron Dome anti-missile system so that the Hamas missiles could kill enough Israelis to match those killed in Gaza. Then it should have accepted a ceasefire to the no-win/no-lose game, until Hamas chose to play the next "proportional" inning of this perpetual T-ball war.
However, just as one side in T-ball can be more skilled than the other, and parents secretly keep score in supposedly scoreless games, so too do the age-old rules of war not change just because we think they must.
Hamas went to war against Israel by shooting hundreds of rockets into the Jewish state. It thought such aggression made sense. The attack was timed just after the U.S. election. Hamas guessed that the Obama administration would be largely neutral without re-election worries over pro-Israel voters in swing states.