Hamas did steal from some of the smaller organizations that donated aid, as those groups were not always on the ground to oversee distribution, according to the senior Israeli officials and others involved in the matter. But, they say, there was no evidence that Hamas regularly stole from the United Nations, which provided the largest chunk of the aid.
What is your source to justify your claim (stated as a fact) that Hamas is diverting supplies and then selling them? Here [1] is a recent article in the NYT this week quoting two unnamed Israeli military officials saying Israel has found no proof of this claim despite Israeli officials repeatedly stating otherwise, and that the UN had been largely successful (via UNRWA) in feeding the Gazan population.