Because TikTok can be used as a weapon by China. Democracies have a weakness - enemies can influence the population and therefore the government. Russia does this quite effectively in my opinion (one example is Slovakia).
Social media of US owned companies was already used as a weapon and still is. Perhaps instead of this legislation we should clearly lay out the regulations that all social media companies need to adhere too.