This is a mistake. In WWII after D-Day, Allied forces accidentally killed over 60,000 innocent French civilians in retaking the nation from Hitler. IF CNN and Twitter were around then, the Nazis, like the Muslims today, would have used photos of dead French babies to undermine Allied resolve, and extend the war. Israel needs to use its element of surprise to the max, and not worry about public opinion. Both Israel AND Arabs in Gaza will be better off with Hamas destroyed.
In the days of WWII the coverage could be controlled and the media played along with government. That is no longer the case. If Israel did not make public warnings they would be castigated even worse. By doing so they at least get their story out and even the propaganda playing field.