Iran is a special case for Israel. Israel isn't directly threatened by Pakistan having nuclear weapons.
The problem with populist-leveraging theocracies with bad economies is that you need a shared national boogie man. For decades, Iraq, Israel, and the US have been that for Iran.
It’s like NK and the US. They keep bellowing about their rockets, but they’ll never fire them.
But if the tail gets ideas about wagging you? And your populace demands you eliminate the boogie man threat with all means at hand, because you've spent decades inculcating hatred in them and blaming ills on the man?
Well... better the boogie man's head than yours on the chopping block.