Because Israel imposed the conditions that required reliance on Hamas to get food. Before that, Hamas did not have a stranglehold on food distribution. And this was completely predictable.
So while Hamas has primary responsibility, Israel is Hamas' accomplice in this matter.