The reason is that Hamas is an organic consequence of childhood conditioning among "Palestinians." If Israel wants this to end, they have to take over the schools and suffer waiting for the rest of the population to purge itself, which would seem rather unlikely.
Like ending black illegitimacy here
Israel is not willing to do that.
Israel should capture all men of military age. Put them in a POW camp.
And for the remaining population, they will have to undergo dehamasification. Then POWs can gradually return to society in Gaza.
Israel should have fought a total war for 6 months. It would all have been over by now.
Instead they're fighting an "insurgency". And the PR is not on their side.
That can be a strategic error because in the near future, the U.S. may cut off Israel diplomatically and militarily.