Burn time, wind, weight and time all factor into calculating the intercept. So if you got one wrong, then you would be making the best estimation. All of this has to be done by a computer, unless you have plenty of time. I imagine Israel doesnt have much time from launch to impact.
Burn times for the Hamas rockets are short. By the time they reach apogee, they have already burnt out and are decelerating. My understanding is the Iron Dome only fires if the rocket's trajectory appears likely to strike a populated area. It doesn't need to vaporize its target either since knocking it off its initial trajectory will send it over less densely populated areas.
Exactly what set of criteria the Iron Dome uses I don't know but it doesn't seem all that difficult given the computational power available nowdays.
Why does it only work in Israel?
At least, this rate of successful intercept attempts.