They are trying to bring modernity to China, while profiting from it at the same time. It is for mutual benefit.
In fact, the risk of helping China to modernize is small. China has almost no friend on its boarder. If China becomes another Nazi Germany in the far future, all the West has to do is build an alliance among the nations around China. That is the West is confident.