For China's motivations.
You can add a land link through to Iran, who are good buddies and customers.
Overflight link to Iran and further on to Iraq, or up to eastern Europe.
Many clients for weapons and technology, and usual consumer stuff, Afghanistan will need lots too.
Another link if one of the other Stans gets antsy on the belt and road.
Plus showing that democracy is rubbish is thick icing on the cake.
They might also get some cover for other goings on in China, as a condition for loans.
Taliban in strict form did consider other moderate Muslims as somewhat heretical.
What is China's interest in Afghanistan ( 10min with Map of area to illustrate )
https://www.youtube.com/watch?v=dlrF6lpGyPI