So you have to realise that Israelis are not thinking normally right now. Even though the Hamas attack has in military terms "culminated", and Israel's military is many times more powerful, their trauma leads them to believe that there is a real, present threat of extinction of the Israeli state and their own nation and families. Under such conditions, it is very hard for them to see the suffering of 'the enemy' as relevent.
It also doesn't help that basically everyone else is just piling responsibility for a solution on the Israelis, despite the US, UK and Europe having enormous historic responsibility for setting up the situation.
[please note, this is explanation, not justification]
[1] https://www.lemkininstitute.com/statements-new-page/statemen...
I think that they think there is a real, persistent threat of Hamas continuing to make this kind of attack. Hamas has consistently said so, so Israel has reasonable grounds for thinking so. Hamas has even said that they won't settle for a two-state solution - they demand the destruction of Israel.
So if you're an Israeli, that leaves you very few choices: stay and accept being massacred every so often, shut down the country and leave, or destroy Hamas. Unsurprisingly, they choose the third option.