In my lifetime, I've forgotten how many times Palestine has been offered independence. They have refused repeatedly and will only accept on the condition that Israel is dismantled and the entire land handed to them.
The wall was built, not to lay siege to them, but to stop suicide bombers going in. I remember the years when there was a suicide bomber in Israel every single day. Egypt build the other wall surrounding Gaza for the same reason. And the reason other Middle East nations won't accept refugees from Palestine is the same reason.