China was Tesla's largest market and major manufacturing base for the international EV market. Up until this year when Chinese domestic EVs took over, and it's looking like Tesla will never get anywhere close to the top ever again.
The tariffs are about undermining the progressive tax system in the US and around the world (after retaliation the retaliating country's tax code gets less progressive) not China. That's mainly why they are being applied to everyone. Other reason is Trump can get favors and distractions on tap for negotiating each case.