I don't think it was inevitable. Fundamentally they want to develop nukes because every 2 months Israel basically wipes out a bunch of Iranians at will. A proud country of 90 million at some point will not let this happen to them. I have no love for IRGC but this is a existential fight for them. Either make a stand now or just endlessly get ground down by these strikes. Even if they abandoned the nuke program the strikes would continue because the goal is to completely break them and having the nuke deterrent is the only way.
The only one and true equal to the US is China. Whether we get bogged down in Ukraine or Iran, it diminishes our will and resources for potential war or even deterrence with China. The pace we've used anti-air munitions is not sustainable and with a true heavy weight like China we don't have the industrial base to stop thousands of missiles and tens of thousands of drones.
The blockage of Hormuz disproportionally hurts Asia. It's a two edged sword though, makes China more vulnerable as they need these natural resources but it also sacrifices our allies as well. SK, Japan, GCC countries. These have to be asking themselves, what's the point of having friends like the US when we are the first to be sacrificed economically for geopolitical benefit to the US? The war was a bad gamble for the US. A lot more to lose then to win IMO.
Only they wanted nukes before Israel ever bombed them.
They wanted nukes to deal with what they call the great Satan (US)