Hamas are Sunni Muslims that are funded and armed by Shi’ite Iran. Hamas needs very little incentive to attack Israel but this rocket barrage is also being done on Iran’s behalf.Iran is keen to monitor and study Iron Dome in action. When Israel attacks Iran’s nuclear facilities, Iran will inevitably counterattack with long range ballistic missiles from Iran, short range missiles fired from Iranian batteries in Syria and Lebanon. The Israeli attack will probably need to be prolonged and will not be a single raid. If the Iranians are unable to effectively counterattack, then Israel will feel no necessity to stop and will methodologically destroy Iran’s nuclear infrastructure.
When it starts, an Israeli aircraft or missile needs to "accidentally" go off target and render Mecca and the Ka'aba a glassed over hot zone.