I don’t agree with how you’re framing the question. The appropriate question is why did Hamas conduct a military raid into occupied Palestine against the occupying power understanding the foreign Jewish invaders would react so violently.
Ask me that question and I’ll give you the answer but why not take it from the horses mouth and review what the Hamas spokesman have said about it. Since you’re a student of history I assume you’ve taken the time to engage in the Hamas narrative to gain the best understanding. Correct?