The war in Gaza is characterized by two sides that, for reasons of domestic and external politics, define victory very differently. Israel employs a reasonably conventional military notion of victory, measuring their success in by their ability to keep their own people safe and destroy Hamas's ability to make war on them. Hamas, for its, part defines victory largely by driving up hatred for Israel both inside and outside of Gaza. These two visions are not only different, but exist on largely different planes, making it possible for both sides to simultaneously view themselves as winning this conflict based on their own criteria.
This is precisely what has happened in Gaza. Israel has largely succeeded in keeping its own people safe and has damaged, but not destroyed, Hamas's ability to make war. The people of Gaza have borne the brunt of this, suffering substantial casualties, estimated today at around 1,100, as well as damage to their homes and communities. Hamas, in parallel, sees the number of rallies against Israel all over the world and rising anti-Israeli sentiment among their own besieged people as evidence of their success. Thus, after several weeks of war, each side can plausibly declare victory.
The cycle is set so that even before this conflict, and the ones before it, started, both sides were almost guaranteed of victory on their own terms. Israel's military superiority is such that they are almost assured victory on the battlefield; and anti-Israel sentiment is so widespread that it takes very little to stoke it. Moreover, because the Israeli government is not terribly concerned with what people in Europe or Gaza think about them, and Hamas has demonstrated a willingness to endure significant civilian casualties in pursuit of their political and strategic goals, neither side loses in any meaningful way when the other side wins. There is even a tragic synergy to these two definitions of victory. The civilian casualties inflicted on the Palestinian people by an Israel pursuing conventional military goals are one of the primary strategic tools used by Hamas to pursue their own goals.
The current conflict is the latest iteration of the cycle of conflict between Israel and Hamas that has also flared up in 2008-9 and 2012. It has proven extremely difficult to end this cycle, or even to bring about ceasefire in 2014, because if both sides can declare victory, then there is no disincentive to keep returning to violence or to keep fighting. This is further exacerbated when domestic political considerations in both Gaza and Israel continually push both sides towards conflict.
Both Hamas and Likud, Israel's governing party, have their political bases among the most radical of their people and rely upon stoking fear, in the case of Likud, and hatred, in the case of Hamas for their political survival. One of the ugly ironies of this conflict is that Hamas and Likud, despite being sworn enemies of each other, have developed a co-dependent relationship. If Gaza were governed by leaders who were not committed to the destruction of Israel, thus legitimizing Israeli fear, Likud's rationale would be undermined. Similarly, if Israel's ruling party was able and willing to think about peace agreements, thus potentially reducing Palestinian hatred for Israel, it is possible that support for Hamas in Gaza would also be weakened. Instead, in the current situation, neither side has to wrestle with the difficult work of making peace. Hamas's rhetoric of seeking to destroy Israel relieves Likud of having to think about peace in a serious way, while Israel's actions in Gaza reduce demand for peace among the Palestinians living there.
While both sides can declare victory in each of these brief conflicts, as the conflicts drags on, victory turns to defeat for both sides. For Hamas, the impact of the Israeli bombardment will ultimately significantly weaken their ability to make war, at least for a while and destabilize Gazan society potentially threatening their rule. For Israel, each day that goes by means a Gazan population that is more radical with a sense of having nothing to lose in expressing their hatred for Israel. Perhaps more significantly, although Israel and its Likud leadership may not care about what people in Europe or Gaza think about Israel, over time this conflict threatens support for Israel among the one foreign population that matters to them. In the US, younger citizens are significantly less pro-Israel than their older compatriots as every iteration of this conflict erodes support for Israel among younger Americans. Today the logic of this conflict is that each side has substantial longer term incentives to avoid conflict, but these are always trumped by shorter term victories, legitimate security concerns, and partisan political considerations.