TL/DR The Israeli political and military establishment has used Islamists as a counter to the secular PLO/Fatah and to impede the peace process for decades.
Creation of Hamas by Israel from How Israel Helped to Spawn Hamas, WSJ 2009
While under Egyption administration the Muslim Brotherhood where
heavily suppressed. After Egypt lost control of Gaza to Israel after
the 1967 Arab-Israeli war Israelis saw the Muslim Brotherhood in the
Palestinian territories, including the wheelchair-bound Sheik Ahmed
Yassin, as a useful counterweight to Arafat's PLO. Sheikh Yassin set
up a wide network of schools, clinics, a library and kindergartens
with Israeli support. Sheikh Yassin formed the Islamist group Mujama
al-Islamiya, which was officially recognized by Israel as a charity
and then, in 1979, as an association. Israel also endorsed the
establishment of the Islamic University of Gaza, which it now regards
as a hotbed of militancy.
Brig. Gen. Yitzhak Segev, who took over as governor in Gaza in late
1979, says he had no illusions about Sheikh Yassin's long-term
intentions or the perils of political Islam. As Israel's former
military attache in Iran, he'd watched Islamic fervor topple the Shah.
However, in Gaza, says Mr. Segev, "our main enemy was Fatah," and the
cleric "was still 100% peaceful" towards Israel. Former officials say
Israel was also at the time wary of being viewed as an enemy of Islam.
Support of Hamas from the Right from How Netanyahu's Hamas policy came back to haunt him — and Israel, CBC 2023
Since Hamas has taken over Gaza with Fatah controlling some of the West Bank the support for Hamas in Israel has largely come from the right, as a way to derail any chance of a negotiated settlement.
Yuval Diskin, former head of Israel's Shin Bet security service, told
the daily newspaper Yedioth Ahronoth in 2013 that "if we look at it
over the years, one of the main people contributing to Hamas's
strengthening has been Bibi Netanyahu, since his first term as prime
minister."
In August 2019, former prime minister Ehud Barak told Israeli Army
Radio that Netanyahu's "strategy is to keep Hamas alive and kicking …
even at the price of abandoning the citizens [of the south] … in order
to weaken the Palestinian Authority in Ramallah." The logic
underlying this strategy, Barak said, is that "it's easier with Hamas
to explain to Israelis that there is no one to sit with and no one to
talk to."
Since 2019 this has consisted of supporting Qatar in funding Hamas.
Netanyahu's hawkish defence minister Avigdor Liberman was the first to
report in 2020 that Bibi had dispatched Mossad chief Yossi Cohen and
the IDF's officer in charge of Gaza, Herzi Halevi, to Doha to "beg"
the Qataris to continue to send money to Hamas.
"Both Egypt and Qatar are angry with Hamas and planned to cut ties
with them. Suddenly Netanyahu appears as the defender of Hamas," the
right-wing leader complained.
A year later, Netanyahu was further embarrassed when photos of
suitcases full of cash going to Hamas became public. Liberman finally
resigned in protest over Netanyahu's Hamas policy which, he said,
marked "the first time Israel is funding terrorism against itself."
Netanyahu's education minister Naftali Bennett also denounced the
payments, and also quit.
After both Bennett and Liberman fell out with Netanyahu, he was
defeated by a new government that stopped the cash deliveries to
Hamas.
But that government lasted just 18 months. Then Netanyahu returned to
power with new, more extreme partners who backed the policy of
fostering Hamas to prevent a negotiated peace settlement.
Netanyahu's current finance minister, West Bank settler Belazel
Smotrich, explained the approach to Israel's Knesset channel in 2015:
"Hamas is an asset, and (Palestinian Authority leader) Abu Mazen
(Mahmoud Abbas) is a burden."
On March 12, 2019, Netanyahu defended the Hamas payments to his Likud Party caucus on the grounds that they weakened the pro-Oslo Palestinian Authority, according to the Jerusalem Post:
"Prime Minister Benjamin Netanyahu defended Israel's regular allowing
of Qatari funds to be transferred into Gaza, saying it is part of a
broader strategy to keep Hamas and the Palestinian Authority separate,
a source in Monday's Likud faction meeting said," the Post reported.
"The prime minister also said that 'whoever is against a Palestinian
state should be for' transferring the funds to Gaza, because
maintaining a separation between the Palestinian Authority in the West
Bank and Hamas in Gaza helps prevent the establishment of a
Palestinian state."