Is it? Sorry, I didn’t know it by the name Nim.
I can’t explain why it works exactly, but sort of inductively:
First define the state where there are an even number of Xs in each row as GOOD, and all other states as BAD. You want the state of the grid to be GOOD after your turn.
If you leave the grid with two rows, each with one X, that’s a GOOD state. It’s clear that your opponent will have to cross out one X, leaving you with the last X and the win. Call that the base state.
Now, I could show by example that you can always go from a BAD state to a GOOD state via a legal move, and that you can never go from a GOOD state to another GOOD state via a legal move. (I’m pretty sure that this could be proven mathematically, but I’m also pretty sure I couldn’t do it myself.)
If you keep putting the grid into a GOOD state, and your opponent perforce puts it into a BAD state, then eventually you will hand him or her the GOOD base state I defined above, and he/she will lose.
There doesn’t seem to be an equivalent trick for the Last-One-Loses variation of the X Game. I believe that’s because, while there’s only one way to put a BAD grid into a GOOD state, there are usually multiple ways to put a GOOD grid into a BAD state.