If Israel had done anything to prevent the attack, the Democrats would have gone ape $#!+ and called Israel the terrorists. The Democrat party is as much a terrorist organization as Hamas, only they do it covertly, supporting other terrorist orgs that do it openly.
Israel doesn't take orders from anyone.
We know the American government -- that many governments -- allow attacks on their own people if it advances political aims. Why assume Israel is any different? That it's not a normal country, with normal corruption?
Maybe they underestimated the carnage, but it does provide an opportunity to destroy Gaza, and it unites the nation behind Netanyahu (as happens when a nation goes to war).