They’ve been itching for an excuse. The level of infiltration of Hezbollah and, from many reports, the IRGC means you have to assume Hamas was pretty compromised too.
Which makes the fact that 7 Oct, with the undefended border and the likelihood they had compromised Hamas for years, almost too convenient for Netanyahu.
They have had ample opportunity to arrange a release of the hostages, but instead have far preferred liquidating Gaza, steam rolling Hezbollah with no end in sight to the war. In fact the IDF has very likely killed more of the hostages than Hamas at this stage.
Not difficult to see 7 Oct as for the “greater good” from Israel’s perspective. Regain southern Lebanon, occupy Gaza again, massively increase the murder and occupation of the West Bank and cripple Iran further.