whyd they do that?
Because the Palestinian's they're trying to kill (the ones firing rockets into Israel) are hiding among their families in civilian locations.
The Israeli's don't want to harm the civilians, so they give warning ahead of a missile strike so that they can leave and evacuate.
That might sound counter-productive, as the terrorists they're after will just leave as well, but quite often they're not doing that. Hence them and their families (innocents) dying in the strikes.
Plus, should the warning get the terrorists out, it means their base of operations is destroyed.
If the terrorists firing rockets into Israel weren't hiding out with civilians then Israel wouldn't give a warning.
It's basically the Palestinians trying a human-shield approach, but the Israeli's aren't taking stuff.