How does Hamas firing rockets at Jerusalem help Hamas?
Yes a rocket barrage to express rage at the assassination of Ahmed Jabari makes some sense. It is a proportionate response. But rockets at Jerusalem? It screams out "come and retake Gaza so Israel is safe". Hamas doesn't benefit.
Only Iran benefits.
By causing a distraction for Israel in Gaza they buy time to finish building an atomic bomb.
I suspect Israel is smart enough to see that.
Remember don't watch the sideshow. Watch the circus.