This is not a new problem. The U.S. Army Special Forces, when first formed in the early 1950s, used past experience during World War II, and even earlier. This taught them that the helpers should all be armed and trained for combat. Everyone must be able to take care of themselves. This impresses the locals, and keeps the overhead low. But the Special Forces are top rate people, and there aren't enough of them for tasks like rural reconstruction in Afghanistan.
So a lot of the current reconstruction effort is wasted. Locals often steal money and materials. Some tribes will insist that money be spent hiring some of the armed young men of the tribe to provide security. Security from who? Well, sometimes the reconstruction workers need protection from the armed young tribesmen who weren't hired for security work. It gets pretty ugly out there, and you begin to understand who these people are so poor in the first place.
Peacekeeping in Afghanistan is not for the faint of heart. The problem is that, the parts of the country most in need of help, the rural areas, are the most hostile to outsiders. Taliban terrorism against reconstruction programs is actually minor, compared to bandits, drug gangs and country folks that have never been friendly to strangers, especially foreigners. Even the PRTs (Provincial Reconstruction Teams), that have a large military component, found themselves spending a lot of time and effort just looking after their own security, rather than doing reconstruction.