Israel has not left Gaza, because it has not granted the Palestinians a separate independent state (Gaza + West Bank +/- Jerusalem). Instead, it has sealed off Gaza on all fronts, confining the Palestinians to the world's largest ghetto and open air prison, with limited movement of food and supplies, trade and workers in and out of the region. The Gazans live in abject poverty and crumbling infrastructure with high rates of joblessness and starvation. Two generations of Palestinians have grown up in the bleak hopelessness of never having their own land, of never breaking free from the grinding poverty, of forever living under embargo. You either lie down and die, or join the freedom fighters (whom the West calls 'terrorists').
Any wonder Israel was attacked?
(I don't condone violence or terrorism, but some forms of terrorism are more understandable even if unjustified. And I certainly do not condone genocide of a downtrodden population by a superior power - like what the Nazis did to the Jews, or what the Zionists are doing to the Gazans. Genocide has to be most evil form of crime, ever.)