a presence in afghanistan allows China to meet those interests very nicely. It provides a launching pad for China into CARs. However, a rider is there too. India and China are heading into economic competition in CARs and while China is leading there in terms of number of contracts awarded for Oil and Gas, the issue remains that the predominant Muslim character of these states causes them to look with unease at China (with its perceived attrocities in Xinjiang) and makes them more comfortable with India (with a predominantly free and vocal Muslim population)
I see only 2 pitfalls in Afghanistan for China
1. Further inflammation of perceived anti-Islam sentiments of China with increased unrest in Xinjiang (as Chinese will be fighting Islamists)
2. Unease and insecurity about long term intentions of China in CARs and this may lead to a negative effect on Chinese business and economic interests there