They did vote in January 2006, where Hamas became the largest party in the Palestinian territories. They formed a coalition government with Fatah which collapsed the year later, whereafter they hunted down and killed all Fatah representatives in Gaza.
Fatah refused to step down, and both Western countries and Sa'udi sent them money and weapons to help. We like elections, except when people vote wrong. No elected Palestinian government has been allowed to controlled Gaza's borders, waters or airspace except for 1921-1947. We ended that