The 2014 Hamas-Israeli war was not so much about Hamas rocket attacks on Israel (which are largely ineffective, especially now that Israel has the Iron Dome anti-rocket system that actually works) but about Hamas efforts to build over 40 tunnels from Gaza into Israel. Hamas planned to use these to get terrorists into Israel to kidnap (or at least kill) Israelis. Hamas knows that Israeli politicians are under tremendous pressure from most of their voters to exchange hundreds, even more than a thousand, Palestinian prisoners for one captured Israeli.
This was proven once more in 2011 when, for the first time since 1985, Israel exchanged imprisoned Palestinians for a captured Israeli soldier (Gilad Shalit). Back in 1985 three Israelis that had been captured during the 1982 war with Lebanon and Syria were exchanged when 350 Palestinians per Israeli captive were released. Over the last three decades, Israel has released some 7,000 Palestinians and other Arabs to obtain the freedom of 16 Israelis. That's 438 Arabs per Israeli.
A growing number of Israelis are opposing this policy, because it has become painfully obvious that this sort of thing just gets more Israelis killed. For example, in the 1990s Israel released 6,912 Palestinian terrorists as a good-will gesture in an effort to reach a peace deal with the Palestinians. Subsequently 12 percent (864) of those released were arrested again for terrorist acts which had led to the deaths of 123 Israelis. This despite the fact that in the 1990s Israel purposely did not release any Palestinians with “blood on the hands” (who had personally killed someone during a terrorist attack). Those released were support personnel who had not, for one reason or another, moved up to be the actual killer. Turns out that a lot of these lower level terrorists do move on to becoming the actual killers. Since the 1990s at least 173 Israelis were killed Palestinians who had been arrested for terrorism but did not have “blood on their hands” and were subsequently released.
Palestinian media proclaims these lop-sided swaps, especially the 2011 one, as a great victories. The 2011 exchange involved 477 Palestinian prisoners freed on the same day that the Israeli hostage (a soldier captured via a tunnel in 2006) was released. Another 550 Palestinian prisoners were released over the next few weeks. Many of those released were convicted of killing Israelis via terrorist acts. Some 300 were serving life sentences for murder. The worst of these (less than a hundred) were not allowed back into the Palestinian territories, but were forced to go into exile (in Syria, Turkey, Jordan and Qatar.) The U.S. opposed the release of some of these Palestinians, because their attacks had killed Americans. The families of Israeli victims protested as well, and some went to court over it.
Most of the Palestinian terrorism occurred after 2000, when the PLO rejected an Israeli peace offer because radicals insisted it was not enough. That began over a decade of Palestinian terrorism against Israel. Within five years, the Palestinian terrorism campaign had been neutralized (mainly by sealing off the Palestinian territories from Israel), but not before thousands of Israelis had been killed or wounded. As a result, about 6,000 Palestinians are in Israeli prisons because of terrorist activities. Hamas has declared that it will kidnap more Israelis in order to get the rest of these Palestinian "heroes" freed. Many of those freed in 2011 agree with this strategy and are calling for more terrorist attacks.