Gaza used to be occupied. Then the Israelis gave it back to the Palestinians because they were promised it would bring peace.
The Palestinians immediately used Gaza as a launching point for rockets and attacks on Israel. Then Gaza was blockaded.
How fucking hard is it to understand?