Hamas explicitly uses those places to launch attacks because they don’t give a fuck about Palestinians civilians and want Israel to bomb them so they look bad. The alternative is to let them launch rockets against Israel with impunity, which has worked so well for the past 20 years, hasn’t it?
If they were carpet bombing Gaza there would be 200,000 dead civilians.