Islamists exploited the United States’ political freedoms to attract fighters for the Afghan War in the 1980s.