Good question.
Let me try to answer it by using the German Invasion of Denmark as an example in WWII.
First Denmark and Germany were at peace, no German minority stirring up trouble in Denmark, Denmark was a small agricultrul country which was cooperating with Germany, basically favored nation status. Denmark's is basically a sand spit, a big one, but basically a sand spit without major national resources.
Germany had no reason to invade and stood to lose by the invasion.
However Norway had substancial resources of minerals needed for German war production. Denmark and Norway are not the same at all, although Norway was governed by Denmark, until the Norwegians won their independence.
The German planning for Norway included the invasion of northern Denmark to provide an airbase for the protection of the invasion fleet. The Danes had just built an airport in Aalborg, which would have been perfect, so Aalborg was a target but not the rest of Denmark. The German High Command planned accordingly until the plans were discussed with Hitler and he made the decision to occupy the entire country.
No one knows why he decided this, but he did, and thus Denmark was invaded because of one man's decision, against the advise of his advisors and basically the best interest of his country.
My point is an invasion can be triggered by unforeseen events and by irrational decisions by a single person.