That is the consequence of a long-term policy. Israel made sure the Palestinian authority was sidelined and helped Hamas get full control of the Gaza Strip. History did not start in October 2023.
We call Hamas "terrorists" for far less than Israel's actions.
[dead]
Of course, Israel is a pure white dove. For instance, they have rallies for "the right to rape prisoners" (and recently to kill them) [0]. Or to willingly mutilate peaceful protesters presenting no risk[1].
The problem is that the total lack of moral limits in Israel only forces their opponents to escalate, or accept to be treated like animals (in the case of the West Bank Palestinians). It also affects the US, since that they have to follow along with Israel' way of doing the war (mainly, war crimes).
[0]: https://www.aljazeera.com/video/newsfeed/2024/8/13/israeli-p...
[1]: https://www.haaretz.com/israel-news/2020-03-06/ty-article-ma...