To answer your question OP, we need to understand what Hamas want to achieve. So let's look at Hamas' own words:- The Hamas Covenant. The second paragraph declares to all the world that, “Israel will exist and will continue to exist until Islam will obliterate it, just as it obliterated others before it.” The introduction section promises “[o]ur struggle against the Jews is very great and very serious” and will only end when “the enemy is vanquished and Allah’s victory is realized,” and declares that Hamas and the people are ready “to sacrifice life and all that is precious for the sake of Allah.” Article 8 affirms that “Jihad is [Hamas’s] path and death for the sake of Allah is the loftiest of [Hamas’s] wishes.”
Article 7 states:
The Prophet, Allah bless him and grant him salvation, has said: ‘The Day of Judgement will not come about until Moslems fight the Jews (killing the Jews), when the Jew will hide behind stones and trees. The stones and trees will say O Moslems, O Abdulla, there is a Jew behind me, come and kill him.’
Article 12 instructs that resistance to destroy Israel is “the individual duty of every Moslem” and that even “[a] woman can go out to fight the enemy without her husband’s permission.” Hamas’s charter instructs Palestinians to raise children to wage jihad against the Jews (Article 18) and warns Palestinians that peace negotiations, “peaceful solutions,” and normalization of the Jews are forbidden and that anyone who engages in them is a traitor destined for hell (Article 13).