It’s not a justification, obviously. But it is a (partial) explanation. Israel wanted to keep sweeping the Palestinian issue under the rug, and Hamas and its sponsors were not going to allow that.
Sure, it's an explanation. Everything shitty Israel or Hamas has done since 1950 has an "explanation" of "that other group did something to me".