Another possibility is that a forced sale could uncover links to Chinese government surveillance in technical assets, and that's a risk they don't want to take.
And scrubbing them out without trace prior to ownership transfer is not easy. One forgotten backup copy of the Git database is enough to leak the info.
Imagine how much dirt Facebook, Apple and Microsoft has.