I don't think this this geopolitical issue is anyone's subject. All the decision makers are mostly guessing on the best course of action--and the Law of Unintended Consequences seems to dominate whatever decision is made.
The basic problem is that Hamas is still able to fire rockets into Israel. It is hard for Israel to sit back and pretend they have won the war.
How Gaza got to the point where it could still wage war 10 months after effectively being defeated, well that is a sign of unpreparedness for what was really happening.
A big mess. I have no answer.
But I think you are right in your original Hamas article. Hamas was losing legitimacy with its own people--and had to do something to stay in power. And it seems they prepared for that day for when they lost popular support.
Maybe they are the master political planners.