The people of Gaza have no legal protections whatsoever. They have no peaceful route to solve their problems.
When they protest, Israeli snipers shoot them in the head. There are no elections in Gaza. The territory is under a constant siege. A good chunk of things in Gaza are controlled by Israel, such as the population registry and resources going into the territory.
So can you entirely blame them when they turn to violence?