Of course it matters! If your enemy kills 3 innocent people on your side and you retaliate by killing a million people on their side, it matters a whole fucking lot.
Hamas is bad. Very few people will dispute that. Israel has proven that, at this point in time, it is far worse because it kills far more innocent people.