How, exactly? Israel was in negotiations with the official representative of the Palestinians, the PA, and they refused all offers and walked away from the negotiations.
The opposite approach happened in Gaza - Israel just unilaterally walked away. They then elected Hamas, who is bent on Israel's destruction, and who proceeded to wage war on Israel for twenty years, culminating in the October 7th attacks.
What now?
Edit: I'm not saying I agree with your framing of the question.
There is problematic framing all around this issue.
eg: As I recall 20 odd years ago perhaps 40% of the eligable voters cast in favour of a Hamas who explicitly ran on a platform of seeking peace with Israel and were considered at the time to be more moderate than the alternatives.
Today almost no one who voted for that Hamas of long long ago is still alive which undermines all arguments of the form "well, they voted for them".
That's an english translation of the charter position in 1988. Sure.
A disputed translation.
What were the concessions in the 2006 election that Hamas made to form a unity government with Mahmoud Abbas (ie. the declaration by Hamas prior to the election that saw them gain a majority number of seats)?
As I said above, this issue is fraught with problematic framings.
People like to say it does, but this stance is largely based on a single line (up at the very top) which is frequently mistranslated, as in the version you are unfortunately citing.
In particular it mistranslates a key verb as "obliterate". When you yourself can verify, right now, that that verb pretty much only translates as "nullify" or "abolish". It is also clear that this refers to the State of Israel, not the Jewish people.
This far more correct interpretation being much more consistent with Hamas's ideology, which holds that Zionism simply lacks legitimacy, and will eventually be seen as irrelevant.
There's also that line about the Gharqad tree. Say what you want about it, but it unambiguously refers to Islamic eschatology, and Islamic scholars at least say it should be interpreted allegorically (as in a conflict will come between right and wrong, those who defend the truth and those who oppose it and all that).
In any case it doesn't refer to the State of Israel, or present a literal call for extermination.
First of all, the way "well, they voted for them" is sometimes used is morally repugnant. It's true that Hamas is the current elected government and military of Gaza, with all that implies, but that says nothing morally about the duty to not target civilians (and the duty to protect them).
That all said I think you're wrong about the history here. Hamas was always very anti Israel, they specifically stem from an islamist tradition which consideres all of Israel to be occupied territory and that all Jews must be removed. They are one of the big factors in destroying the Peace process by launching many terror attacks to destroy it.
The opposite approach happened in Gaza - Israel just unilaterally walked away. They then elected Hamas, who is bent on Israel's destruction, and who proceeded to wage war on Israel for twenty years, culminating in the October 7th attacks.
What now?
Edit: I'm not saying I agree with your framing of the question.