One little noticed (by the media) aspect of NATO training given to Afghan and Iraqi troops is the large amounts of rifle ammunition provided so the troops can use their weapons often enough each year to learn how to fire accurately. Afghans, and especially the Taliban, consider themselves great warriors. But they are not noted for the accuracy in a firefight. That is a recent development. Since the 1980s, the country has been awash with AK-47s and RPG rocket launchers. The Afghans took to the AK-47, and the thrill of emptying a 30 round magazine on full automatic. Afghans considered this a worthy battlefield technique, but in reality it was not unless you were making a movie. Quickly emptying magazines is a not bad move during a brief firefight, especially if you were fighting other Afghans. But against soldiers who aim and fire single shots, the "spray and pray" approach gets you killed.
NATO trainers built rifle ranges for the Afghan Army and trained Afghan officers and NCOs in time-tested techniques of becoming an accurate shot, and training their own troops to do the same. Afghan troops were also equipped with M-16 rifles. These are more accurate, for single shot use than the AK-47 (as well as being a little lighter, and using lighter ammo so you can carry more). The Taliban soon found that they had to be more careful when getting into a fight with the Afghan Army. Like the foreign troops, Afghan soldiers could now be detected by ear. The Afghan troops were firing M-16s, one shot at a time, while their Taliban adversaries will be on full automatic. The sound of an M-16 and AK-47 are different and full auto fire is obviously different than single shots. The Taliban often depend on setting up an ambush, with the intention of fleeing if they did not kill or wound most of the soldiers with their initial fire and roadside bombs.
There had been an Afghan tradition of precision, long range shooting. Before the 1980s, this skill was treasured for both hunting and warfare. Since Afghanistan was the poorest nation in Asia, ammo was expensive, and older men taught the young boys all the proper moves needed to get that first shot off accurately. But because of that poverty few families had a rifle and most of those who did, could not afford to buy the ammo needed to develop accuracy. Thus sharpshooters were highly respected, not only for their skill, but because they could afford to buy a rifle (usually a bolt action one) and ammunition.
During the 1980s, Saudi Arabia spent billions of dollars to arm Afghans with all the AK-47s and ammo they could use, and they used lots of it. But rarely for target practice. Compared to bolt-action rifles like the British Lee-Enfield, the AK-47 was much less accurate when one shot at a time was fired. Since the 1980s it's become much more common for Afghans to have a rifle, usually an AK-47. But it was rare for any of these new riflemen to be very accurate with their weapon. The NATO training program changed that, and changing the way the Afghan Army fights.
The Iraqi situation was different. There was some warrior tradition among tribes (usually Sunni) in rural areas. But the Iraqi army was not generous with ammo for target practice. The one exception was the troops selected to be snipers. These were few and an elite. It wasn’t until the Americans showed up that the Iraqis noted that all troops could be trained as sharpshooters and the Americans had a lot more snipers (about ten percent of infantry). The Iraqis accepted the American approach but after the U.S. left in 2011 corruption in the military returned and suddenly there was no money for all the target practice needed to make the troops accurate shots.