Tehran "spent" 2T USD on the nuclear weapons program, which they could have spent on water desalination for example.
Yes having the deterrent is strategically beneficial, but working toward it paints a huge target on your back, while you need to pay for development, endure sanctions, etc.
Any state considering such weapons development already knows this. So this war is not new information.
And it's far from over yet.
Iran could very well end up cut off from the strait as rival gulf states build pipelines, rail, and drone defenses. (Sure this kind of long term thinking is not characteristic of the actors involved, but politics change easier around Iran than inside it.)
> Tehran "spent" 2T USD on the nuclear weapons program, which they could have spent on water desalination for example.
(Side note: That... seems like a very high figure to me?) For comparison the US spent close to $1 trillion in 2024 on the military. It could have saved lives and spent that money on healthcare. But that's not how govts work. Iran didn't get a drawstring bag with 2T in it and chose to throw it all on nukes.
Additionally, you're trying to bring a (totally valid tbf) logical argument ("Desalination is critical and an excellent place to spend money that's not going into saving lives") to a government that behaves like a cornered wild animal. It will act to save itself first, even if attacking the aggressor hurts itself too in the process.