It makes a sick kind of sense. If you’re one of the conservatives in power in Israel, and you oppose a two-state solution that would give Palestinians autonomy, keep two weaker factions fighting each other rather than stabilizing a new country.
It doesn’t excuse the inhuman barbarism committed by Hamas against civilians, but it does mean Netanyahu should be immediately removed from power and arrested.
The Palestinian Authority is the only organization there with any actual legitimacy, and had Israel publicly, openly supported it, Hamas could never have gotten a foothold, while the Palestinian Authority would have had reason to normalize relations with Israel.