Alongside the other comment, Hamas is far from popular in it's leadership position in Palestine. Probably something to do with the last election being in 2006. Saying it is representative of all Palestinians is a pretty tough reach.
I think you are confusing hamas with the PA. From what i understand, the reason that there have been no elections is because those who are de-jure in power know they would lose to hamas if an election was held.
Regardless, at some point it doesn't really matter how popular leadership is, only that, whether rightly or wrongly, they are in a position to give orders and have those orders obeyed.