Thanks to jackde for linking to the below where it is explained how Hamas plan to take advantage of Israeli rules of engagement which limit their use of force due to the presence of civilians when they return fire on Hamas, any resultant civilian casualties will help to slow the Israelis down as they have to treat them, and the destruction of homes will increase hatred towards Israel and mobilise support for Hamas :
IDF forces in the Gaza Strip found a Hamas manual on “Urban Warfare,” which belonged to the Shuja’iya Brigade of Hamas’ military wing, the Al-Qassam Brigades. The manual explains how the civilian population can be used against IDF forces and reveals that Hamas knows the IDF is committed to minimizing harm to civilians.
In a portion entitled “Limiting the Use of Weapons,” the manual explains that:
The soldiers and commanders (of the IDF) must limit their use of weapons and tactics that lead to the harm and unnecessary loss of people and [destruction of] civilian facilities. It is difficult for them to get the most use out of their firearms, especially of supporting fire [e.g. artillery].
Clearly Hamas knows the IDF will limit its use of weapons in order to avoid harming civilians, including refraining from using larger firepower to support for infantry.
The manual goes on to explain that the “presence of civilians are pockets of resistance” that cause three major problems for advancing troops:
(1) Problems with opening fire
(2) Problems in controlling the civilian population during operations and afterward
(3) Assurance of supplying medical care to civilians who need it
Lastly, the manual discusses the benefits for Hamas when civilian homes are destroyed:
The destruction of civilian homes: This increases the hatred of the citizens towards the attackers [the IDF] and increases their gathering [support] around the city defenders (resistance forces[i.e. Hamas]).
It is clear that Hamas actually desires the destruction of homes and civilian infrastructure, knowing it will increase hatred for the IDF and support their fighters.