Not only are the PA and Hamas restricting which Gazans can leave, but Egypt is as well.
Hamas accused Egypt of stopping Hamas members from traveling through Rafah en route to Saudi Arabia for Ramadan. They accused Egypt of collaborating with the PA to restrict the movement of Hamas members and leaders. They also said that Egypt tried to blame Saudi Arabia for the rejection of Hamas members.
It should be recalled that in the past, Hamas stopped Fatah members from going on the Hajj pilgrimage. Also, in 2007, Hamas used Hajj as an excuse to send terrorists to Iran for training.