A lot of this comes down to cowardice. The cowardice of Hamas. They do not wear uniforms, they do not mark their bases with flags, they do not attack valid military targets. They hide among civilians and strike at soft targets.
This leaves the Israelis with two choices, Either supine acceptance of terrorist attacks, or a response which will inevitably cause civilian casualties.
The blame, if there is any to be approtioned, lies in a large degree with the 'ordinary' Palestinians who allow Hamas to do this. Does anyone believe for a moment that the Israelis would not welcome the help of Palestinian 'civilians' who could provide them with the intel they need to make precise and effective infantry strikes on Hamas operatives nd bases?
But in default of any Palestinian having the inclination or the backbone to defy Hamas, they are left with the old option -"Kill them all and let God sort them out".