Israel was attacked, as was the United States by Japan. There is no basis for thinking the Hamas terrorists running Gaza will stop their aattacks, just as there was no reason to believe that Japanese aggression would stop at Pearl Harbour. Israel is therefore entitled to wage war until it has won total victory, as did the US and its allies. Sadly, there is no upper limit in the rules of war on the headcount of dead civilians