It helps to consider the historical course of our foreign policy. Before World War II, American foreign policy was guided by colonialism. We were the dominant power in this sector of the world and considered North and South America to be within our sphere of influence -- Europe, in particular, should stay away. This policy worked well for American business interests, less so for advocates of democracy.
In World War II we used our beefed-up military forces to defeat the Axis and established ourselves as the number one world power. With the Marshall Plan, our foreign policy shifted towards spreading democracy across the globe. During the Cold War this meant that if a country adopted socialism, it was the enemy. (In 1953 the US fomented a coup in Iran that overthrew a pro-democracy, socialist regime.)
When America entered the Vietnam War, our initial objective was to defeat the forces of North Vietnam and introduce democracy to the unified country. Our loss had a negative impact on our perspective and since 1973 US foreign policy has been reactive; we've been less interested in spreading democracy.
Theoretically, when confronted with a foreign crisis, the President should consider the short-term security interests of the US, as well as its long-term strategic interests.
The Bush administration justification for the 2003 invasion of Iraq initially focused on short-term security issues: "[remove] a regime that developed and used weapons of mass destruction, that harbored and supported terrorists, committed outrageous human rights abuses, and defied the just demands of the United Nations and the world." Later strategic interests were included: "to change the Middle East so as to deny support for militant Islam by pressuring or transforming the nations and transnational systems that support it." The security phase had detailed planning. The strategic phase made a weak attempt to introduce democracy to the region.
The US occupations of Afghanistan and Iraq demonstrated that the US, 70 years after World War II, continues to be effective at regime change; we know how to conduct military operations that decapitate enemy leadership. However, we were not effective creating a stable civil society; we were not able to "change the Middle East so as to deny support for militant Islam." (To the contrary, in many regions we made things worse.) At present, America is not able to inculcate democracy and nip terrorism in the bud.
This grim reality explains why Americans are unhappy with our foreign policy, especially the situation in the Middle East -- the death of the promise of "Arab Spring." In the minds of most Americans our foreign policy is based upon our use of overwhelming military power buttressed by the rationale that when we send in the marines we are paving the way for democracy.