Western nations are having problems with illegal Afghan migrants. Many are just seeking jobs and a better life, but some appear to have more sinister intentions, and many of them are hospitable to Islamic conservatism and radicalism. But Western nations that refuse asylum to these migrants, too often find that the Afghan government doesn't want to take them back.
What the Afghans are doing is not unusual. Poor countries the world over either encourage illegal migration to the West, or simply do little or nothing to thwart it. There are several good reasons for this. For one thing, those migrants who make it to the West and get jobs, send a lot of money back home. In many poor nations, these remittances account for 10-20 percent of GDP. Moreover, the migrants tend to be the most ambitious, smartest, capable and adventurous, just the sort of people who would join a local rebellion and make it work. The governments of poor nations (usually poor because of a dictator or otherwise corrupt officials) are glad to be rid of these potential troublemakers, but happy to see all money flow back to the immigrant's family.