And in any case, you can construct a cause and effect chain that goes way further back than that.
Israel attacks because they were attacked
Palestine attacks because they were attacked, children were killed
Israel attacks because they were attacked, palestinians are terrorists and cowards
(this a few times)
Palestine attacks because they've had a fucking Iron Curtain built
Israel attacks because they've been attacked
Palestine attacks because they are [at least consider themselves to be] oppressed
Israel attacks because their settlers were attacked
Palestine attacks because they've had more and more of their territory occupied by settlers
Repeat a few times, at some points it's 'Palestine' and at some points it's 'Palestinian groups' (as you go back in time, and palestinians weren't as fucked, terrorists had less and less support, enought to not be identified with the Palestinian 'nation').
So it's unfair to say 'Israel attacks because they were attacked'. Because the attacks didn't come out of the blue.
The fact is that this is a war, and most of the powerful world sides with the powerful, winning side (Israel). It's hard to assess the righteousness of either side, but CLEARLY Palestinians have it harder.