It is a popular idea around the world that the Iraq war was over oil, yet, the US import figures from Iraq don't support that statement. Peak oil imports from Iraq were actually prior to the war and amidst the oil for food program. While some individuals would say that the reason oil imports dropped was due to the fighting in Iraq, the chart from the EIA has shown that daily oil production increased almost every year since the major drop from the initial invasion, in fact around 2005 the daily production exceeded it's prewar levels.
Some rough math shows that while the US did see the greatest share of oil production around 2005, at 42%, our share of Iraqi oil production now, 18%, is less than it was back in 2002, 22%. Moreover, production levels have held flat. This makes the image of the US military coming to Iraq to pilfer Iraqi oil for it's own gain, especially considering the massive amounts of oil that America imports every year, the idea becomes untenable if evaluated honestly and seriously. The question is why did the US invade?
The US invaded, not for Iraq's freedom, or because of a need to police the world, but because it thought it was in it's best interest. At the time of invasion the United States was incredibly worried of popular islamist uprisings that could result in a widespread shift of the Mideast against the United States. Looking back at the idea now we rightly consider the idea absurd, but a wounded hegemon often doesn't look at threats as objectively as it should. The US saw a threat and wanted to deal with it before it became a major problem. And Iraq, despite the lack of any real hard connections to militant islamists, was the perfect target for US purposes.
Not only had the Iraq alienated much of the world community, making the military action much more palatable, but the location was perfect. Afghanistan was too remote for that country to act as a base to bring pressure upon the Islamic world, but Iraq was in the heart. It bordered nations with known islamist terrorist groups, such as Saudi Arabia, Syria, Lebanon and so on, who would predictably send the best and brightest (using that term loosely) to fight, and die, again the 'Great Satan'.
The US presence in Iraq would also put pressure on the neighboring nations to do something about the militants within their border. In fact, it gave these nations little choice as now the Iraqi borders were even more pourous. And while the leaders of those nations might not care about the Abdul brothers of Iman, who they had contacts with and are on friendly terms, they might very much care about the Dawn of the Ismael Fighters, who they are antagonistic with. Iraq become a transit line, not only for fighters going into the Iraq, but also for fighters going from one nation to another.
Lastly, the US thought, or rather hoped, that they could establish a nominally democratic nation that was friendly to the US but hostile to Iran. This of course didn't happen, but it was a gamble the US was willing to take.
We know how the war played out, the tens of thousands of lives and the dollars wasted. But it wasn't for oil, it was the game of geopolitics. It's no less terrible, especially considering that the US overestimated the Islamist threat, but nation states have their own agendas, regardless of the morality or righteousness of their actions.