The people that executed those October attacks swore fealty to the Hamas of 2023 and represent the Hamas of 2023.
That Hamas is very different to the barely elected Hamas of 2006 who were then the lesser of other evils and swore blind to the people that they sought peace with Israel.
The bulk of the people in Gaza did not elect the Hamas of 2006, nor support the Hamas of 2023, nor deserve to be starved and murdered.
Somewhere in both stories lie similar questions; what actions transformed the Khmer Rouge that opposed Norodom Sihanouk in 1970 into the Khmer Rouge of 1975 more aligned with Sihanouk and prepared to murder those that ousted Sihanouk, what actions transformed the Hamas of 2006 into that of 2023. Both stories prompt asking what justifies, if anything, the slaughter of tens of thousands.