So Israel has announced a unilateral cease fire and pulled its troops out of Gaza. Some on the right are unhappy that Israel has ceased offensive actions so soon. But here’s the thing- they were rapidly reaching the point of diminishing returns. All military actions take place in a political sphere, both domestic and international.
Domestic Israeli politics supported the incursion as a means to curb Hamas rocket attacks on Israel, provided there were not a lot of casualties among the Israeli ground forces.
Internationally, there was generally support (or at least muted condemnation) for the same goal.
Israel could reasonably expect its operations in Gaza to attrit a portion of the Hamas leadership, locate and destroy stockpiles of rockets and the production centers for them, disrupt the smuggling tunnel network and punish Hamas enough to make them reconsider the efficacy of their rocket attacks.
What ground operations could not be expected to do was destroy Hamas as a political entity, nor cow the Palestinians in the Gaza Strip to the point where they sued for peace. And Israel has no desire at all to engage in long term occupation of Gaza. That would be costly in terms of money, leave Israeli troops vulnerable to attack by insurgent forces and undermine domestic political support and international forbearance of their actions.
As to the timing of the cease fire, there can be reasonable disagreement whether it came too soon, too late, or just right, but to argue that Israel could have continued to fight in Gaza without paying an undue penalty of some sort is niave.