Iran has shown itself a rational actor time and time again by not escalating against continued provocation by Israel and the US, knowing that to do so would be to enter a conflict it can’t win. That’s not the behavior of an irrational actor who’s willing to fight whatever the cost, even total annihilation (which would be what happened if Iran nuked the US/Israel).
They may be religious fanatics, but they’re not idiots.
It’s not a justification, obviously. But it is a (partial) explanation. Israel wanted to keep sweeping the Palestinian issue under the rug, and Hamas and its sponsors were not going to allow that.
They may be religious fanatics, but they’re not idiots.