I imagine they use a type of Islamic justice to punish anyone that breaks this law. It's hard to run a farm when your workers have no hands. Believe it or not the US really was attempting to provide stability in the region (amongst other things), and yes we did many terrible things while we were there, we eventually we realized the futility of the situation.
For those who lack understanding of why it's has such strategical significance, here's a bit from Wikipedia:
Afghanistan is a landlocked country located at the crossroads of Central Asia and South Asia. Referred to as the Heart of Asia, it is bordered by Pakistan to the east and south, Iran to the west, Turkmenistan to the northwest, Uzbekistan to the north, Tajikistan to the northeast, and China to the northeast and east.
So of course tensions run high. But they haven't had a single century of stability since... checks notes...
• Hotak dynasty 1709–1738
• Durrani Empire 1747–1823
• Emirate 1823–1839
• Restoration of the Durrani Kingdom 1839–1842
• Restoration of the Emirate 1842–1926
• Dost Mohammad unites Afghanistan 27 May 1863
• Anglo-Afghan Agreement 26 May 1879
• Independence 19 August 1919
• Kingdom 9 June 1926
• Republic 17 July 1973
• Democratic Republic 27–28 April 1978
• Islamic State 28 April 1992
• Islamic Emirate 27 September 1996
• Islamic Republic 26 January 2004
• Restoration of Islamic Emirate 15 August 2021
At least a few centuries.
Yes we committed atrocities in the name of the "war on terror" but it seems people forget the country is now run by The Taliban and it seems like there's a lot of support for them. This group of militant nationalists who believe women should only be there to bear children, raise children, and if those children are female? rinse and repeat. Dress how you want or attempt to learn something not directly related to wifely/motherly duties? That's a lashing. Do it multiple times? That's an honor killing.