Hamas was only in control of the Gaza Strip in the first place (for the last 20ish years) solely and entirely at the agreement and behest of Israel trying to gain peace. The attacks broke that agreement, what did anyone think was going to happen?
And the last is rhetorical, of course, because what is happening now is exactly what Hamas and all their supporters expected. They got in their licks, of course the Israelis responded just like any state would to such an attack, a bunch of quasi-innocent cannon fodder it getting wiped out while the masterminds call the shots from Tehran, Qatar, etc, and spin up the rest of the Western liberal apologists to put pressure on Israel to stop - again - so they can try to consolidate their position.
Lather, rinse, repeat, it's the same story over and over. You can almost excuse a bunch of 20-somethings not realizing they are being played, if *every single step of this tawdry cycle wasn't clearly documented on the very internet they are supposedly experts about*. The cycle is about 20 years for a reason - anyone older than about 20 isn't dumb enough to fall for the same scam again.