They do. The Chinese government gave them a special exemption, presumably because they wanted to build EV manufacturing expertise. Other foreign auto companies are not allowed to open their own factories in China; they have to do a joint venture with a local manufacturer.
>presumably because they wanted to build EV manufacturing expertise
Worked with Apple!