Much of the issue is anger management in a very violent population. Press attention obviously gives the Taliban an incentive to both take credit for any incident and try to exploit our evident near-panic over the problem by contributing to it.
Even if the Taliban can't provoke us to retreat, stoking mistrust between American/Coalition forces and Afghan forces will reduce our effectiveness in fighting the Taliban.
This article addresses the issue pretty well, although it tends to pessimism more than I think is justified. There is a perception among Afghan troops that American troops are arrogant. For violence-prone Afghans, that is potentially deadly.
I don't quite understand this view:
"I have never heard of anything in Vietnam comparable to what we have recently experienced in Afghanistan," said James McAllister, a political science professor at Williams College in Massachusetts who has written extensively about the Vietnam War. A British military expert on colonial wars, Martin Windrow, said the level of these types of attacks were "almost unheard of" in any conflict he'd studied.
I certainly don't remember having this level of "green-on blue" attacks in Iraq. So it isn't just a religious thing. But whether or not there is an exact comparison in history, the broader problem is not unusual.
For example, communist infiltration of South Vietnam's armed forces was pretty high. And troops would desert sometimes rather than fight the enemy. In Afghanistan Islam seems to provide incentive to sacrifice their lives to take down an Infidel, but the problem of loyalty of local allies is a common feature of counter-insurgency.
On the other hand, Islam does not prevent the vast majority of Afghan forces from fighting the Taliban. So the idea that the violent nature of Afghans is the real underlying cause is most persuasive to me.
Further, I can think of one fight that was defined by local indigenous forces turning violently on the colonial power's troops.
For me, this may highlight the fact that we once had our Special Forces take the lead in training local forces. These guys have the local knowledge to be effective. But with their other job of direct action attacks in high demand, the Army has tasked non-special forces to more jobs training Afghans. Could the lack of sensitivity by these non-special forces troops be the reason for sparking an increase in attacks on our troops (above what might be expected from the simple expansion of Afghan forces the last several years)?
Regulars may just not be skilled enough to accommodate the underlying cause (violence-prone allies) of these "green on blue" incidents. Perhaps we've gone too far in taking away the training role of special forces and handing off the job to regulars. Perhaps we need to restrict the regular alternative to non-war situations. Or make sure special forces troops supervise the regulars in their training missions.
This a a problem like any other that we should solve rather than just the latest excuse to retreat from Afghanistan before we win. Work the problem.