Based on your argument, why don’t the Gazans leave? Would you not consider Gaza to be a bad neighborhood?
The answer for both sides is that both sides have historical claim to the land, and there is no better neighborhood to live in for either of the sides anyway.