Perhaps a good intuition pump is how we react when this breaks down. If some group within a state's borders is using violence (i.e. sending soldiers to attack skyscrapers in another country), the attacked country has a cassus belli against the harboring country.
This feature is so critical to how the modern system treats territorial integrity that we sometimes refer to states which can't control violent groups within their own borders as "failed states."