They were and it was very well calculated, they didn't want to have a unified government in the West Bank and Gaza, especially the PLO, which had international recognition.
This way, Israel could completely avoid the peace process and continue annexing the West Bank. It is very well documented, just one Google search away.
https://www.google.com/amp/s/www.timesofisrael.com/for-years-netanyahu-propped-up-hamas-now-its-blown-up-in-our-faces/amp/
Bibi thought he could contain Hamas while also keeping the Palestinian leadership fragmented, but it backfired; he himself called Hamas a great asset. This information is also just one Google search away.