Hamas has no interest in stopping the oppression of the Israeli government. Only in perpetuating their own hold on power - which is only maintained by constant warfare with Israel. That it will destroy Palestine in the end and does nothing but hand victory to the far-right fascists in the Israeli government is immaterial - they'll retire in Qatar with billions in embezzled money by the time Palestine is fully genocided.
Israel was slowly destroying the Palestinian people and culture long before Hamas and will probably continue after Hamas. Hamas logic is probably to go down fighting rather than accepting their own people's destruction submissively.
We are arming Ukraine to protect themselves from genocide. Maybe eventually some governments will take the same stance with Palestine.