Wishing countries could be better actors towards foreign geopolitical interests and foreign citizens is a nice thought and a world we should work towards.
In the meantime, countries still need to act to protect their citizens and their national interests against foreign adversaries-- especially prohibiting adversarial/dangerous behavior within their own economic zones and borders.
(i.e., China also has a rational interest in restricting operations of US firms gathering information on Chinese citizens-- we don't need to choose "good" or "bad" guys).