American Foreign Policy and the Reagan Doctrine
Carter's foreign policy (a tribute to Woodrow Wilson) relied heavily on America's morality and humanity. Unlike Wilson, it wasn't self-righteous and didn't really contain the massive superiority that the US had during WWI. Carter believed that all of our allies should not be governed by tyrannical, abusive, awful leaders (like in Zimbabwe, South Africa, Argentina) and that we should help when there are human rights violations.
Reagan took a different approach.
Reagan believed that the US should always counter communism. Always. Especially in Latin America.
The Iran-Contra affair was almost completely justified by the Reagan doctrine. Maybe that's why it happened...