Let's leave aside the morality of the conflict and the various emotions that have been raised and focus on the question of how one of the world's best military forces has failed to subdue what is effectively a rag tag group of men with beards, despite the obvious military advantages. The answer the fact that this is a conflict of two different things. Israel the nation state with its powerful military has gone to war against Hamas, which at its core is an ideology that people adopt. Nation states fight conventional wars and have conventional rules. Nation states hope to achieve tangible assets like land or routes to strategic assets. Israel has defined borders (Which it expands contrary to International Law) just like the USA, England or China.
Ideologies by contrast are intangible and seek to aquire intangible things, namely hearts and minds. As long as an ideology is adapted by someone, it cannot die, though it can admitedly be driven underground and weakened. Ideologies are able to morph and take different forms. Ideologies can shift in ways that nation states cannot. The ideology of "Palestinian Resistence" (terrorism in Western lexicon) used to be preserve of Yasser Arafat and the PLO. However, when the Fatah Party, which succeeded the PLO was seen to have become ineffectual, the ideology shifted to Hamas. By contrast, nation states can only expand through terratorial expansion, which Israel has done since its establishment in 1948 on several occasions (International law accepts the 1967 borders as legitmate) and migration, which in Israel's case has mainly come from Russia in the past two decades.
So when understands the combatants in this way, it's clear that what Israel achieves on the battle field will not lasting effect on the Palestinians in the Gaza strip. Israel and Hamas are fighting for two different things. Israel will undoutedly win the physical confrontation with its supperior firepower but it will be unable to defeat the concept that Hamas stands for - namely Palestinian Resistence. Let's look at other conflicts like Vietnam where the world's mightest power was forced to retreat despite winning every battle of the war. America the nation state lost the ideological battle at home and on the battle field. Then there was the Soviet Invasion of Afganistan, which effectively destroyed the Soviet Union - The nation state called the Soviet Union lost the idea of "Jihad against the Athiest Communist Infidel," - The likes of Osama Bin Ladin adopted this idea and you had Soviets against Mujahidien from Afgahnistan and the rest of the Muslim world (People with zeal for their ideals are dangeously flexible - Osama was quite happy to accept the CIA and the American government funding and training his movement.)
Ironically, Israel was once an "Idea" or "Ideology," before it was a nation state. Like other ideologies, it was powerful when it had the most passion behind it. The idea of "Israel as a Jewish Homeland," that inspierd the Irgun (Regarded as a terrorist organisation in its day) to drive the occupying British out of what was then called Palestine. The idea of Israel has driven a small nation to defeat larger conventional military forces and allowed people to "Make the desert bloom." After sixty years of struggle, the idea of Israel has finally established itself - so much so that despite the parts in Hamas's charter that refuses to recognise Israel's right to exist, even the most die-hard fanatics in Hamas have publically admited "The REALITY of ISRAEL."
In light of Israel's own development as a dream, it's such a pitty that Israel has been fighting Hamas as if it were one of the conventional states it once confronted in its early years. Imagine if Israel had chosen recognise Hamas for what it is, an idea. You cannot kill an idea in the physical sense, you have to take it on in other ways.
What are the options? For starters, let's look at definitions. The ideas that win are usually the best defined. Israel has established itself into a reality from an idea because it had a clearly defined goal - Israel is the "Homeland of the Jewish People," and everything Israel has done has been towards making it a reality. The Palestinians have been less successful in creating definitions. The PLO was a success in getting the Palestinian people global recognition as shown by the signing of the Oslo Accords. It was a failure in creating a viable Palestinian State - there was simply no vision.
Hamas has proven successful in resisting Israel's occupation and blockades. The more Israel and her Western allies impose blockades and other efforts to cripple Hamas administered Gaza, the stronger Hamas has grown. Hamas, however, needs to become an ideology beyond being a resistence movement if the Palestinians are to achieve peace. - It shold be noted that Hamas won the Palestinian Parliamentry elections in 2006 because they appeared to have a better vision for Palestinian controlled lands - which meant Hamas ran competent administrations unlike Fatah.
Israel needs to find a way to the ideology that is Hamas. As things stand, it's doing a good job in helping feed Hamas the "Resistence Ideology." Imagine if Israel lifted its blockade on the West Bank and Gaza strip, moved back to its 1967 borders as proposed by King Abdullah of Saudi Arabia in 2002 and 2006. Imagine then if Israeli businessmen invested heavily in Palestine to create a viable neighbouring state - sounds impossible under current tensions, but it would remove the reason why "Resistence Ideology" exist and Hamas and other Palestinian groups would have to redefine themselves. It sounds far fetched - neither side will accept it - but then again it was once improbable that the People's Republic fo China and the Republic of China (Taiwan) would ever have direct flights - though one should note that in this case the conflict of ideology was not between two states or people. The definitions of China were only between the politicians, the business people on both sides saw themselves as a single nation - hence Taiwan and China are economically one country despite the politics. Bad blood between Israel and the Palestinians is felt deeply at the people-to-people level.
Ultimately global leadership needs to recognise what is what. Recognising the difference between ideologies and physical contstructs like nation states and tactics like terrorism will enable global leaders to tackle the fundimental problems faced by the world. Look at the Bush Administration's failure to recognise what is what. The administration that vowed to wage "War on Terror," has seen the resurgence of the Taliban and Al Qaeda remains. Blind support for Israel's military actions in 2006 and 2008 have ensured a generation of people will vowing to destroy what has essentially been a force of good. If so many people were not suffering it might be funny if one could see the way in which people like former President Jimmy Carter are attacked when the point out that ignorance is certainly not bliss.