Our military is to be used when invaders try to invade our homeland.. It is really that simple.
That was the intent when “invade” took a lot of effort to stage.
Problem is it’s so quick to “invade” (ex.: ICBMs), or to invade elsewhere and have significant consequences here (ex.: WWII).
Hence the doctrine of decisive handling of threats abroad before they produce serious effects at home ... and the subsequent hesitation to bring military force here (if they’re needed _here_, something went _really_ wrong _there_).