Over the past few decades, US foreign policy has been insane, crazy, misguided, and stupid. The US backs and funds the most oppressive regimes in the world (ex. Saudi Arabia). The US also propped up Saddam Hussein in the early 80's before deposing him in 2003. All of this is happening while the rhetoric coming from the State Department has been that the goal of US foreign policy is to promote human rights and democracy. First off, the promotion of democracy and "human rights" in other parts of the world makes absolutely no sense. Secondly, the rhetoric has been the exact opposite to the actual policies that have actually guided the State Department.
In the case of human rights and democracy, many cultures and nations across the world simply do not agree with the principles of human rights. It goes against their cultural views of the way the world works. Secondly, many places in the world cannot structurally handle democracies (note that the even the US isn't close to a direct democracy although there are some democratic elements). Many of theses countries who have been supported as "democracies" in the Middle East have actually become more extreme. In many of these countries like Iraq, there are long-standing sectarian or ethnic divides between the countries. These conflicts have been going on for thousands of years. To think that "understanding" and "democracy" can fix the problems in these countries is flat out ignorant.
Another major consideration in the Middle East is that there are obviously lots of natural resources in these areas like natural gas and oil. These resources are very important for countries across the world to operate normally and the supply lanes and trade routes in the Middle East must be kept open. In other words, it's actually dangerous for one major power to come in and take control of the entire Middle East. The reason it's dangerous is because then you get a regional hegemon that actually has the power to disrupt these supply lanes, trade routes, and impact the price of natural resources very suddenly.
Therefore, the US must take a balance of power strategy in the Middle East. In other words, it becomes critical to make sure that there is no country, nation, or empire that gains too much power in the area. Fortunately, the internal conflicts in this region of the world automatically create conflict in the region. The job of American foreign policy should be to make sure that no one in the Middle East has the ability to dominate every part of the region. If one country is becoming too strong, the US must undermine that country by supporting its enemy and vice-versa. If you can keep these nations in the Middle East fighting one another, it becomes much more difficult for them to get into wars against others.
Also note that direct military intervention should be used as a last resort and should be avoided at all costs. The best way to win a war is to win without military conflict. US foreign policy shouldn't be to go into countries, overthrow governments, and install puppet regimes nor should it be to try to nation-build. As we've learned from Iraq and Afghanistan, nation-building is extremely difficult and very costly. The best strategy for the US in the country's current position should be to maintain the balance of power in the region. It should be to make sure that no regional hegemon can come to power in the Middle East. The balance of power strategy could also be useful in other parts of the world as well, but it's particularly true in the Middle East. The US must stop propping up puppet governments and must instead try to maintain the balance of power. Trying to suppress conflict in a part of the world where conflict has been the norm for thousands of years is flat out stupid.