They have competing strategic visions.
The current ruling coalition under Bibi Netanyahu, which is far more conservative, wants Israeli control of the entirety of what used to be Mandatory Palestine between the West Bank of the Jordan River and the Mediterranean. Palestinian Arabs would have some presence in such a society but it would be as a minority, and only if said minority plays nice with the majority. There would be a single state with a Jewish ethnic majority and government acting under Jewish jurisprudence as opposed to secular, Christian, or Islamic.
The goal for the invasion of Gaza for this coalition is simple: break the will of the Gazans. The coalition points to the fact that the Gazans elected Hamas over the more secular Fatah in 2006, and that Hamas has, for a very long time, refused to recognize that Israel has any right to exist anywhere in former Mandatory Palestine. The coalition under Netanyahu sees them as a thorn in their side and will commit total war on Gaza, seeing that as a way to convince the Gazans that there will be no success in raising a military challenge to Israel. They've shown themselves to be right while committing a whole host of actions that probably deserve ICJ review. While Hamas still holds Jewish hostages, they have virtually no control over the current war. The Israelis conduct military operations at will in the territory and Hamas has no real way to prevent that.
The other vision is that of a significant portion of the Israeli population and most of the rest of the international community, which at this point just want the hostages back. Some believe in a two-state solution. There's probably no way to achieve that with Hamas in charge of Gaza, but that will come later: the hostages are the main priority. This part of the population sees Netanyahu's government as incompetent for failing to stop the massacres on October 7th and for not having gotten the hostages back.