XML markup must be well-formed. (Hey! No rabble-rousing from you veterans in the back row!!! This is for the uninitiated!)
Think of markup as boxes. You can’t have a box half in and half out, you can either have a box in a box or box next to a box. This is how tags work in XML. It’s technically how they’re supposed to work in HTML, but the rules got shot to you know where for HTML long, long ago.
Word does some interesting things if you try to break the rules and do the half-in and half-out thing when applying XML markup to content in a document. Microsoft specifially calls this behavior “snapping”. If you try to apply markup to be half in one tag and half in another, Word says “uh-uh. Can’t do that” and then “snaps” your cursor to the next legal place where you can put markup; something which can confuse users until they understand why this is happening. Especially if you get snapped 3 page from where you thought you were putting the markup.
So how do you know if you’ve selected an entire box and aren’t overlapping boxes? Word determines this by the good old paragraph break. New paragraph = new box. You can’t apply markup to half of one paragraph and half of another (either preceding or following, or even somewhere else in your document). It’s an “everyone in or out of the pool” deal here.