Wasn't Uber losing ton of money in China? Also they had problems with regulators and local governments. I thought that was the main reason why they left.
I think the "problems with regulators and local governments" part is the implementation of the "forced into merging into a local entity" effect the great grandparent comment referred to.
Ironically, while it may be part of the implementation in China, Uber also has "problems with regulators and local governments" in every single place they do business. I am surprised Uber even got the chance to try in China.
Didi was also losing a ton of money in China. When they were competing head-to-head, both were offering ridiculous subsidies to both riders and drivers.