You don't understand military ops. By announcing like this they can see the Hamas operatives expose themselves as they start moving, preparing like little ants and bomb them - not civilians.
They didn't bomb so many civilians. Their collateral damage is actually the least in modern times and modern wars. Its just sad that sometimes the terrorist planning to kill thousands is standing in a group with 10 civvies.