It isn't just Hamas who's making them stay there. In the 1960's it was the policies of most of the Arab world to shove their undesirables to Palestine, into the refugee camps, and make them stay there. They artificially increased the Palestinian population to far greater numbers than it had been. It was the creation of a people bomb.
They're people and we have to deal with them as people, but to not realize that these people are being used as weapons of war by their own terrorists is not rational.