Yeah, except the allies recognised the practice as a war crime. They could most certainly pick, say, a few blocks over an entire city.
Your theory here in any case faces the same problem: If Hamas makes a rocket that isn't that accurate, and then gets 20,000 of them, does that make Hamas rocket fire justifiable as a means of wiping out whole cities?
I guess you don't think the rocket fire is a war crime? Oh wait...I'm sure that you do, and there goes your whole theory.
If Hamas does their level best to make their rockets accurate, and if they use them to attack military targets, then I'd be willing to accept the practice, even if they occasionally missed and hit civilians. It would certainly be an act of war, as mak says, but not a war crime.
My perception of Hamas is that they're targeting civilians only and trying to avoid military targets. Perhaps Micro can speak more to that, but the areas the rockets are aimed at don't seem to have an redeeming military value whatsoever.
It rapidly becomes clear that the goal of Hamas' rocket fire isn't to wage war, but to try to kill as many Israeli civilians as possible. I could be wrong about that, but that's how it appears. That isn't war, that's attempted genocide.