Many of their weapons were hand-built by little boys in caves and in shanties in Pakistan. I watched a video several years ago on the subject.
My friend, The AK Rifle series is a black market gun of choice the world over, not just Afghanistan, but worldwide, we even had the shooters in North Hollywood assemble fully functional AKs in their own home by simply acquiring black market parts and ammo. AKs are cheap, and well designed, and somewhat easy to assemble, and people can get the separate parts and put them together.