With foreign policy, we are “damned if you do, damned if you don’t.”
We were “infidel tyrants” before taking over Afghanistan, and then we became “infidel occupiers” afterwards. When we leave we are back to “aloof, wealthy, Western infidels who don’t care about the suffering of Afghanis.” There is no winning.
We can never do enough for a culture that already hates you no matter what you do.
If we don’t take action against terrorist groups like ISIS and the Taliban, we “just don’t care” and are evil. If we bomb those groups, who use innocents as human shields, we are then “evil murderers.” We can’t do anything right in the eyes of some.
The problem all stems from the ultra-conservative form of Islam that dominates these cultures, which teaches them to view themselves as superior and to despise all else. Even if some/most of the populace may not be very devout, it is the cultural influence of Islam that breeds the hate for the “Christian”/Infidel West.
There are some people in the world who would still hate Americans unless we gave them all our wealth and killed ourselves. Even then, they would still hate us because we didn’t do it sooner.
I recommend Bernard Lewis’ book What Went Wrong: The Clash Between Islam and Modernity in the Middle East. It is a history of how ultra-conservative Islam took hold when the West surpassed the Muslim world in wealth, power, and influence, and how Islamic theology couldn’t square this fact away with the belief that Islam would soon conquer the world. “If only we are more devout and follow Sharia to the letter will Allah bless us with victory over the infidels” is the train of thought. It is very analogous to Jewish thinking during the Roman occupation in the time of Jesus. Except, now we are Rome, and Islamic terrorists are the Zealots and Sicarii.