the answer lies in that X
is defined outside the scope of the xshift=-10
transformation - see here for details as well as possibly here -, i.e. the node X
is defined and has a fixed position before the beginning of the scope of the transformation which then is only applied to nodes newly defined within the scope.
an example may clarify things: extending the scope to include the definition of X
shows the expected behavior with only one line:
\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\draw[help lines] grid (4,3);
\begin{scope}[xshift=-10]
\coordinate (X) at (3,3);
\draw[red ,thick] (1,1 -| X) -- (2,2 -| X);
\draw[blue,thick] (1,1 -| 3,3) -- (2,2 -| 3,3);
\end{scope}
\end{tikzpicture}
\end{document}
produces:
