I've long wondered why the U.S. or any other country needs to send its armed forces to another country to fight home-grown rebels. If the rebels can fight effectively, why can't the local government soldiers fight back effectively?
First, how strongly do the fighters on either side believe in their cause? Too often, the rebels are "true believers" who think their cause will bring about a "better" world, and the government soldiers are reluctant supporters of a weak or corrupt government. The latter may be in the military because it is one of the few jobs available, and even some erratic pay is better than no pay at all.
Second, a weak or corrupt government cannot organize itself to effectively solve any problem. It either spends too much time trying to get people involved co-operatively or spends too much time lining pockets.
A foreign army can't do much about either situation unless it completely takes over the country and rules with an iron fist. Armies from democratic countries find this very unpalatable.
For the most part, foreign armies are just that, foreigners. They don't speak the language and don't understand either the customs or the politics. This was especially true in Iraq, where the foreign army created more enemies than it eradicated.
The situation may be changing in Afghanistan. According to David Brooks, "The Winnable War", New York Times, 2009-03-27, "every Western agency is finally focused on" creating a civil society. We shall see.