The reason the US sides with the Saudis automatically rather than the Iranians is that Saudi Arabia is a key oil producing country but it is extremely vulnerable to external threats. Iran has a population nearly thrice that of Saudi Arabia and it's economy is at least somewhat more diversified (despite the crippling sanctions).
The US would only be free to disengage from the Middle East if we were able to see something of a balance of power emerge. Balancing Turkey and friends against Iran and friends is the way to do that I believe.
Please forget the concept of a balance of power. It's a crock that needs to die. I majored in international relations, and BoP is outdated and outmoded. Any decent IR theorist today recognises that BoP and the far superior BoT (Balance of Threat) are just theoretical models for how states
should behave, not how they do or will behave.
The US historically backed Iran over Saudi Arabia, only shifting support to the less palatable, controllable, and capable Saudis because of the rift formed by the Iranian Revolution, particularly the hostage crisis. The Iranian Revolution was a stunning intelligence and diplomatic failure by the Carter Administration, which need not have fallen into any of the traps it did. Following that fiasco, the US failed to normalise relations, as it should have, despite several opportunities. Following the Gulf War, the US, having obtained military bases in Saudi Arabia, was understandably committed to staying the course of its new foreign policy in the region. But given subsequent events, it is imperative that the US eliminate Iran as a threat to its hegemony in the region.
There are two ways this can be done. The first method, favoured by the Saudis and neocons like Dick Cheney, is to defeat Iran militarily. This would be bloody, brutal, difficult and in no way certain of success. The US hasn't really succeeded in creating pro-US regimes in Iraq after ten years or Afghanistan after twelve, and Iran is a stronger, more unified and more anti-American state than either of those to begin with.
The alternative is to co-opt Iran. The benefits of this policy are numerous; no threat of the closure of the Straights of Hormuz; cheap access to Iranian oil; decreased possibilities of the Saudis raising oil prices; less need for military assets in the region; depriving Russia and China of a strong ally in the region; a friendly, mid-level regional power bordering Russia; depriving North Korea of a partner in nuclear weapons development; ending Iranian support for anti-American terrorist organisations in the region; opening up the Iranian market to American producers, especially arms manufacturers, as Iran's market is far larger than that of the Saudis. These reasons don't include the more moralistic ones, such as that Iran is considerably less repressive and unlikable than Saudi Arabia.
The only reasons, honestly, why America has overlooked a rapprochement with Iran until now have been Saudi and Israeli lobbying in the US itself, inertia from the pro-Saudi policy adopted in 1990, the fallout from the hostage crisis
thirty years ago and domestic political considerations. You can't make an opening to Iran without your political opponents labelling you 'weak' or an 'appeaser.' But Iran has opened the door, publicly this time. An American-Iranian rapprochement is long overdue.