I'm not trying to make excuses for the crimes against humanity committed in China by the colonial powers. But we need to look deeper into the root causes of historical events.
The Chinese at some point went around the world during the Ming dynasty, sailing to Africa, etc. Found out that everyone was pretty much uncivilized in terms of technology, etc. and thought there was nothing actually out there. So later on they thought it was simply a waste of government funds to go on such expeditions, especially when everyone seemed to want to reach China instead to conduct in trade rather than the other way around. Therefore the Ming became extremely inward looking, etc. And that carried on into the Qing dynasty. But prior to that in the Song, etc. China was pretty advance. Another issue is that voyages, etc. could not be monetized. Merchants who took risks to explore the world, etc. made 100x more back on their investments, especially after the fall of the Byzantine empire to Ottomans which halted the overland silk road, forcing Europeans to find another route by sea to Asia for items they needed. The Chinese couldn't find such profits at least not in the 14th century.
Obviously this is all very simplistic, and you could easily write 1000s of pages on this topic. But to a large degree today's China is Europe of the past, where they feel they can learn from everywhere, but the West, not so much. Seems as if the two have traded places, where the West is hubristic. Thinking everyone else is pretty much stupid, and uncivilized. Although maybe mentalities of both is starting to shift again.