The rolling snow ball began with the kidnapping of the boys.
What was originally planned I believe, was that they'll be taken for prisoners' swap, but somewhere along they way, the kidnapping turned into a murder.
That was an epic fail for Hamas. Not only they didn't succeed in releasing prisoners, they brough that IDF's anger on Judeah and Samaria's Palestinians, and caused the arrest of 350 of their men.
Another epic fail.
That aside, two major problems stood for them, they were not an issue till now. One, thousands of government workers of Hamas in the strip, who're supposed to get salaries from the PA, are without salary for long days. Some of them see that as Hamas' fault. The other, the Egyptian regime is anything but friendly.
So they didn't succeed in any swap, they have no money from Egypt (The money from Qatar is not theirs because Israel doesn't allow Quatar to fund Hamas) The Rafah passage is closed, 350 of their men are arrested thanks to their screw up, and they cannot give salaries to their own people.
Their own way out is through war with the "occupation". Now, in the past weeks, the killing of Abu-Khdair allowed them an opening to start a war, with the excuse of "National murder" (Even though that the war started with the killing of the 3 Israeli teens), and 40 rockets were fired EACH DAY upon civilians of the south, for nearly 2 weeks.
At first, Netanyahu was not at all eager to respond properly, because of the Murder of Abu-Khdair and the sensitive area struggles. But each passing day the situation got worse in the south and in other parts of Israel, and the pressure on him to respond escalated.
The government reached the point when it saw only one solution, which is pulling the rug undearneath Hamas. We'll have to see how it ends.