The massive emerging market there was too much of a $$$ opportunity for them to ignore.
Yes, there's a difference between, say, a fast food chain that tries to get a foot hold in China and a technology company that helps provide tools used to limit rights of free speech etc. However, this is a matter of degree, not kind.
All business with China that helps advance their economy helps to legitimize their regime, and also gives China a significant bit of influence over even companies' non-China businesses. When a company's business is China is so critical to lose that it will subject itself to China's will even outside of China, that company is complicit in the same way, just to a lesser degree, as these tech companies providing more direct support.