For example in the US, when TikTok became too popular, politicians quickly reacted to avoid having a major social network that was backed by a foreign country. Legitimately in the name of consumer protection, of course, but clearly also other interests. Funny how the US very selectively protects its consumers.
It's not great for the consumer (less competition/freedom), but ultimately it's about protecting local expertise to avoid being fully dependant on another region (obviously, sometimes this gets abused). Losing local expertise increases the brain-drain, since any skilled person will know that they won't get many good job options locally.
I live in Quebec/Canada, which has many rules in the name of consumer protection, but usually it's really about protecting local businesses without going against free trade agreements. I'm not a fan of isolationism, but winner-take-all types of scenarios, where no one can compete against foreign semi-monopolies hurt us in the long term. It's hard to find a good balance. An interesting take, in Quebec and in the EU, is seeing many laws that only apply above a certain scale.