This is well known chestnut in world politics. A state has limited resources and has to make a decision. It either feeds its army or feeds its people who have been hit by famine.
If you feed your people, you would not have any army to protect you from other contenders to your leadership. You also cannot appeal to the UN, the World, Hollywood or Bob Geldof for help and assistance.
If you feed your army, the world will come to you to provide humanitarian relief. All the top tier charities will come in their private jets to offer you options. You can also collect commission and even re-sell the provisions provided.
If Hamas did not fire a single rocket, there is no basis for Israel to do anything. When the Egyptians, Jordanians and other Arab countries started to move towards recognising Israel what was initially a confrontation between Arab states is now a conflict between Hamas (not even a state or state rep) and Israel.