In addition to the many brave men and women lost, the Iraq war cost the U.S. an estimated $1.5 trillion.

That's a lot, no matter how you cut it.

Before the shale revolution, few questioned why the U.S. needed to be involved in the Middle East. Many remembered how devastating OPEC's oil embargo was in the 1970's, when gas prices quadrupled and gasoline had to be rationed. 

But things are a bit different now. 

Because of the shale revolution, the U.S. is becoming increasingly independent from Middle Eastern oil. Last year, the U.S. passed Russia as the world's largest producer of oil and natural gas combined. U.S. oil  production has increased by around 50% since 2008. 

The United States produced around 7.5 million barrels a day last November. According to the Energy Information Agency, the United States is predicted to produce 8.3 million barrels a day this year. Canada's oil output is projected to double to over 6 million barrels a day by 2030. .

The U.S. is increasingly becoming more energy independent. So why is the U.S. still so heavily involved in the Middle East?

The need to maintain stability
There are still some unstable regimes in the Middle East. The U.S. needs to be there to keep the peace. Because oil is a global commodity, if there is a disruption, the U.S. economy could undergo a recession. 10 out of the last 11 recessions were preceded by oil spikes. To many, a recession costs far more than spending money on military expenditures. Spending money on the military creates jobs, but having a recession destroys jobs. 

The need to keep the dollar as premier reserve currency
Having Middle Eastern oil priced in dollars assures that the U.S. dollar is the global reserve currency -- and the U.S. has benefited greatly from  having the dollar as the premier global reserve currency. McKinsey Global Institute estimates that in a normal year, the net financial benefit for the dollar being the premier global reserve currency is between $40 billion and $70 billion. 

The need for geopolitical leverage
While the U.S. doesn't necessarily need oil from the Middle East, the world does. Having forces there and controlling the choke points such as the Strait of Hormuz gives the U.S. leverage in negotiations with other major powers such as China. If the U.S. cuts off supplies, China's economy and its government will likely face massive disruption. With U.S. military forces likely to stay, U.S. energy companies are likely to continue winning contracts.

Even though national oil companies such as Saudi Aramco and National Iranian Oil Company own most of the reserves, there is still plenty of opportunity in the Middle East. 

Halliburton (NYSE:HAL) and Schlumberger (NYSE:SLB) benefit greatly from providing oil field services to the national oil companies. ExxonMobil (NYSE:XOM) is active in Iraqi Kurdistan, which has around 45 billion barrels of oil. There are reports that Iran, which has 151 billion barrels of oil, is courting ExxonMobil as well.  

Even though the U.S. may need the Middle East less, its military forces are likely to stay.|

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.