Note that Israel is also occupying the West Bank, and has quite thoroughly destroyed Palestine there. It's not just Hamas. If it was, they could leave the West Bank to Fatah.
you forget that Israel literally created Palestinian autonomy there. before that those areas were occupied by jordan (west bank, annexed in 1950) and by egypt (gaza. fenced off) till 1967 they didn't bother to try to create palestinian state .