Keep in mind after Sept 11 2001, the USG was freaked out about authoritarian regimes having access to WMD’s after what AlQ did with domestic aircraft.
Three countries at that time were in the spot light. Iran, North Korea and Iraq. Iraq was determined to be the ‘easiest/safest option’ in the opinion as there was a UN resolution to allow for force as Iraq was not adhering to the mandate inspections. North Korea and Iran were also seen as two having the highest number of US casualties due to the fanaticism of the population. So Iran who was #1 on the shit list for state sponsored terrorism got a pass. All that did is push NK and Iran to try to acquire nuclear weapons faster as they saw what occurred to Iraq when the US Military came to call.
Hindsight being 20/20, if you took Iran out in 2003, it would have been fairly isolating to Iraq. Afghanistan’s western border wouldn’t have been as porous as well. Iraq would have been trapped between KSA and a new Iran. Lebanon would likely be more stable and Israeli not being a a target by Iranian state, the Gulf of Oman and Straights of Hormuz also clear.
Of course that would have meant thinking further out than one’s headlights in the off position…