The why is simple and complex at the same time. Those perpetrating the attacks were Hamas operatives, and the attack comes at a time when the Egyptian army is redeploying in Northern Sinai, coordinated with Israel, to restore law and order in that area as well as protecting the gas lines carrying Egyptian gas to Jordan and Israel. Hamas is interested in destabilizing the Egypt-Israel border as a way to influence the political process in Egypt. A destabilization of the border would play in favor of the Muslim Brotherhood and that would be good for Hamas. It also comes after the world acted as one to stop another fake humanitarian convoy from provoking a bloody confrontation with Israel, and also after the Israel Air Force targeted rocket launching locations in Gaza from which Hamas has been raining death and destruction on Israeli civilians – the latest one near Beer Sheba.
The choice of Eilat as a target is also for multiple reasons. The obvious reason is that Eilat is the only major Israeli population center near enough to the Egyptian border to be withing reach of infiltrators. Also, the Israeli-Egyptian border is more porous than the Israeli-Gaza border which has a security fence. Many Hamas operatives took advantage of the opening of the Gaza-Egypt border following the fall of Mubarak and crossed into Sinai, where they wait for orders. A third reason that makes Eilat a good target is that it has become over the years a major tourist destination for Europeans, and yet another reason is that Eilat is also close to the Israeli-Jordanian border, and a destabilization of the border with Egypt around Eilat will have an impact on the border with Jordan. Considering how the “rejectionist” group (calling for an end of the Peace treaty with Israel) is growing in Jordan, Hamas hopes to ignite more violence.
Hamas' goal has been, and continues to be, the destruction of Israel. Any destabilization of the treaties with Jordan and/or Egypt serves Hamas' agenda. But Hamas has other goals too. Like destabilizing the PLO lead government that controls the West Bank. Since the “unity talks” collapsed, Mahmoud Abbas' (Abu Mazen) bid for unilateral declaration of a Palestinian State with United Nations backing in September has become a lot less probable. After all, Abu Mazen doesn't even control Gaza. A unilaterally declared Palestinian State would be valid only in the West Bank, and any international aid that would follow to it would come with strings attached about not investing in Hamas-controlled Gaza. Hamas has, therefore more than one reason to destabilize the PLO control in Judea-Samaria
But something more important to consider is that once again, the Palestinians leaders are playing their own power games with the blood of Israeli civilians and the suffering of their own people. How much longer must two people suffer for the selfishness and heavyhandedness of the Palestinian leaders? Had the Palestinian leaders respected the Oslo agreements from 1993, the Palestinian people would be now celebrating 12 years of independence. Instead, ten families are burying their death and dozens others are spending their time in Hospital waiting rooms. And all for what? To feed the greed of people who promote violence and destruction. I don't know about for you, but from where I'm sitting, it doesn't make much sense...