That is the right thing to do if any country wants to ensure that it does not become beholden to China. China's motivations are questionable given that they are not interested in protecting the legitimate interests of any other country other than China.
The new rules tightening cybersecurity in Japan do not mention the Chinese companies by name, but Beijing is already protesting.