OK, this is not meant to be exhaustive, but just some thoughts that have run through my mind over the years. It seems to me, the United States has been reactive rather than proactive in dealing with situations in the Middle East. Some falls under the law of unintended consequences.
Anti-communism drove much of our policy in the Middle East until Communism fell in Russia, but the results linger into the present.
Because of his proximity to the former USSR, we propped up the Shah of Iran, breeding unrest in the country that eventually caused the overthrow and the taking of the Americans hostages. Our poor relationship with Iran caused us to to back Saddam Hussein in the Iran-Iraq conflict. That more than likely led Saddam to think that he could invade Kuwait and we would look the other way.
The US support for Israel, meanwhile, has caused problems all with the rest of the Arab world.
We backed Pakistan and India went to the Soviet side. India has the (slightly) more stable government.
When the Soviets invaded Afghanistan, we backed the Taliban, only to have to fight them after 9/11.
Anyone seeing a pattern here?
Any way just my view of things.