Well I have quite a lot of interest in Iran - I have known many Iranians for reasons I do not understand! - and where the regime is at is using the West much as nicola sturgeon uses england, as a scapegoat for every ill the regime has inflicted on the country.
This comes to a head with the 'Rothschild conspiracy' which maintains that the Jewish Rothschilds, based in England, are the secret illuminati that are running the world and pissing on Iran, specifically.
This is OFFICIAL GOVERNMENT POLICY. And believed by the majority of Iranians
To that end it sponsors acts of terrorism to maintain enmity with the UK, America and Israel in order to say 'look, they are waging war against us'. It would love to have nuclear weapons to threaten Israel with.
And to threaten Britain and the USA with in case we thought of doing a Desert storm on them.
Now having nuclear weapons ourselves is no defence against Iran's nuclear weapons. Any use of nuclear weapons against Iran would like arouse sympathy across the islamic diaspora. Use of nuclear weapons by Iran would receive tacit acclaim across the same diaspora. In fact the only thing that works against Islamic militancy is total utter public humiliation.