I am assuming that Hamas are not stupid.
I came across a journalist called Haviv Rettig Ur. A political correspondent for the Times of Israel.
He made an interesting point (excuse my clumsy paraphrasing here) that due to the terror attacks the left in Israel has now abandoned a path to a two state solution (although i am aware that Hamas has always rejected this). His reasoning was that the attacks had woken the left to the prospect of having another terrorist run state in the west bank as Gaza became. That Israelis now thought that they had conceded ground in the north and that had led to a vacuum which had been filled by Hezbollah. They then conceded ground in Gaza when they pulled out in 2005 and this vacuum was filled by Hamas.
They now look to the West Bank which is much larger than Gaza and has direct access to fire rockets and can harm Israelis from a high vantage point over the whole of Israel. Therefore many are pulling back from wanting to entertain the idea of two states.
So Hamas has united Israel, where before there was division, Possibly killed Israeli support for a two state solution on the grounds of Israeli safety.
He also said there was trade with Israel and Gaza, some manufacturing would be done in Gaza, people in Gaza worked in Israel.
Now the border will be closed. I find this so sad, no more trade or Jobs with Gaza for Gazans. Israel understandably will not want to open that border again as it is clearly unsafe to do so and a huge security risk.
So Garzans have lost jobs and income, electricity and water from Israel. the north is flattened. They now will have to rely on foreign aid through the Egyptian crossing only. Do Egypt want their country to be the only crossing to Gaza and all that entails. I don't think so.
That Hamas stockpiled fuel etc for themselves shows that they knew there would be a closure of the border and utilities would be turned off.
Did they think this would ignite sympathetic Islamic countries to rise up against Israel and declare war. If so then that hasn't happened. Were they expecting more help from those they perceive as their allies. Egypt and Jordan have apparently said no to any Palestinian refugees (i am not blaming them for that, they don't want Hamas in their countries). The support for Hamas has been noise and talk but not perhaps the military support they were hoping for.
Can anyone provide insight and analysis as to what it is that Hamas wanted to happen from this attack. I cannot see how it has benefited them or their cause. The consequences are horrific.