If you will have a closer look, rocket attacks started to climb up after Israel left Gaza.
There was expression during the disengagement process from Gaza: Palestinians can build either Singapore or Somali. It's their choice to make.
They made choice in 2006 when they elected hamas. You can see on graph how Hamas elected to use resources