That's exactly the point for Uber: they lost against a local company, because the government did everything it could do so that didi would win the battle.
I've used both Didi and Uber in China many many times, and it seemed like they were competing against each other pretty hard, without discounts etc.
From my perspective as a customer, it seemed like they were both just trying to outspend each other to gain market share, and Uber just decided it was no longer a good use of cash.
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.