In the short term, Tesla needs China more then China needs Tesa. Tesla's shareholders would revolt if Tesla gave up the Chinese market.
In the long term, this will help bootstrap China's expertise in electric car manufacturing.
It's a brilliant economic policy. Foreign companies cannot resist access to such a large market - they can either partner, or watch their competitors do so.