People say this situation is complex, but it really isn't. There's a territory inhabited by two peoples – both with historical claims to the land, but one more recently dispossessed and colonised by the other. Among Israelis and Palestinians alike, there are moderates who are willing to share the land and live side by side (i.e. some parts of the Israeli opposition and the Palestinian Authority), and extremists who want it all to themselves, up to and including by exterminating the other side (i.e. Hamas and Likud, and the even more extreme smaller groups sitting further to their right).
At the moment, in Israel and Gaza alike, it's the extremists who are in charge. "From the river to the sea" is the policy of Netanyahu and his allies in government every bit as much as it's the policy of Hamas. And the more extreme one side gets, the stronger it makes extremists on the other side, who point to the other side's violence as evidence that their own moderates are toothless and ineffective. Thus the worst elements of both sides get even stronger and those who would extend the olive branch get even further sidelined. That's where we are now.
We've seen this script plenty of times through human history and in all parts of the world, and it always requires convincing people that the other side is a special kind of evil that can't be reasoned with. And that begins by situating the evil not just in the extremists, but in the population as a whole – which is what you're doing when you point to an election from twenty years ago to suggests that all Palestinians are opposed to peace. This is the logic of genocide.
Some more facts about the 2006 election (and your example of Australia, albeit under a different electoral system that skews away from major party primary votes, only goes to show how it's possible to take government in a country without majority support for a given political party):
• Hamas campaigned under the name of the "Change and Reform" party, mostly positioning themselves as an antidote to longstanding Fatah corruption. They could have called themselves anything – I think the fact they went for such a benign name suggests that they knew they would struggle to win by presenting themselves as militant crusaders or ideologues.
• We know people aren't generally single-issue voters but will choose the major party they get behind for all sorts of reasons. An exit poll quoted on Wikipedia gives some indication of voters' sentiment at the time and what issues they considered important:
https://en.wikipedia.org/wiki/2006_Pale ... Exit_polls
An exit poll conducted by Near East Consulting on 15 February 2006 on voters participating in the 2006 PA elections revealed the following responses to major concerns:
Support for a Peace Agreement with Israel: 79.5% in support; 15.5% in opposition
Should Hamas change its policies regarding Israel: Yes – 75.2%; No – 24.8%
Under Hamas corruption will decrease: Yes – 78.1%; No – 21.9%
Under Hamas internal security will improve: Yes – 67.8%; No – 32.2%
Hamas government priorities: 1) Combatting corruption; 2) Ending security chaos; 3) Solving poverty/unemployment
Support for Hamas' impact on the national interest: Positive – 66.7&; Negative - 28.5%
Support for a national unity government?: Yes – 81.4%; no – 18.6%
Rejection of Fatah's decision not to join a national unity government: Yes – 72.5%; No – 27.5%
Satisfaction with election results: 64.2% satisfied; 35.8% dissatisfied