The U.S. Army Special Forces is currently facing a problem with the ROE (Rules of Engagement) that requires American to ignore behavior by Afghans that would be a felony in the United States. An American Special Forces soldier is being prosecuted for violating that ROE by hitting an adult who was sexually abusing a child. This is something American diplomats have had to deal with since the United States was created over two centuries ago. It is an ancient practice or, as the old saying goes; “when in Rome do as Romans do.” Or, in diplomatic parlance, don’t try and force the Romans to adopt your superior customs. American troops overseas are generally required to follow the same rules. All this does not mean that the United States approves of this, to Americans, atrocious behavior. But one condition of allowing foreigners into another country is that you do not harass the locals. Nevertheless other countries, and their diplomats can and do criticize each other for perceived misbehavior.
As a result of the current incident (a man having sex with a boy) the Afghan government acted shocked, surprised and insisted such behavior was forbidden and not condoned by the government. The commander of U.S. forces in Afghanistan responded by issuing an order for American troops to report any such incidents that they encountered but not to take action against Afghans themselves. As a result of the media and political uproar over this incident more American troops are coming forward with similar accounts of being ignored or threatened with punishment for making an issue of this Afghan behavior.
Many Americans, especially politicians and journalists, are shocked that this sort of behavior is tolerated. But this is nothing new. In 2012 there was similar public outrage when it was publicized that the U.S. Army had issued a new cultural sensitivity pamphlet containing some similarly explosive material. Among the many things troops were advised not to talk to their Afghan colleagues or students about were; homosexuality, sex with children, and abusing women. All three practices are common in Afghanistan, especially the southern areas where most American troops operated.
What the cultural sensitivity program was trying to get across was that the Afghan attitude towards sex was very different than in the West. Moreover, in the Islamic world sex is, well, classified, especially illicit sex. Some enterprising Western journalists had already done some reporting on the ancient practice (in the entire region, from North Africa to India) of using young (well, teenage down to about ten) boys for sex and other entertainments (dancing, cross dressing, camel jockeys). This has been a thing with the rich and powerful in the area for thousands of years. In some places it is sort of legal, but if not it is generally tolerated, even if officially forbidden. This includes, in many Moslem nations, slavery. Many of these abhorrent (to Westerners) practices survive in cultures that tolerate such activities among the wealthy and powerful. Getting details on this story for Western audiences is dangerous, as those who indulge would rather make Western reporters disappear than just stop reporting on this topic. These guys don't consider themselves pederasts, just the custodians of ancient cultural traditions. Or something like that. Homosexuality and sex with children is particularly popular in southern Afghanistan. Abusing women (often fatally) is common throughout the country.
When the Taliban came to power in the mid-1990s, they outlawed the child sex, but it continued anyway, just more discreetly. The Taliban tried to crack down on homosexuality in general, especially in the south around Kandahar (the "capital" of the pro-Taliban Pushtun tribes). Didn't work. Casual homosexuality has long been the custom down there, and Afghans from other parts of the country (especially non-Pushtuns) have a large repertoire of humor and insults about the proclivities of those Kandaharis. One of the more printable ones is about how birds flying over Kandahar have to do so with one wing, as the other one must be used to cover the avian backside.
One of the reasons the Taliban are widely hated is because, while they officially (and loudly) condemn using boys for sex, some Taliban leaders do it anyway, as do a larger proportion of the drug lords the Taliban are allied with. Most Afghans now know that pederasty (sex with children) is reviled in the West and homosexuality is still looked down on. Given that, and the Islamic prohibitions against both practices, most Afghans would prefer if Westerners just didn’t mention it. American soldiers were advised that this was a particularly good idea if talking to Afghan soldiers or police who were armed. American soldiers were also ordered to not interfere if they encountered any of these local practices. As a practical matter, making changes to current American ROE for troops and diplomats is not an option. That would cause a major diplomatic dispute worldwide and in the countries at the center of them (most of them Moslem) popular outrage at “Western interference.” It has happened before and there is no easy way out of a mess like that.