I try to diagonalize: $Y = \left(\begin{array}{ccc} X & -X & 0\\ -X & X & 0\\ 0 & 0 & 2\,X \end{array}\right)$
after doing the general diagonalization formula: $Y_{\mathrm{Diagonalized}} = V^{-1}\,\Lambda\,V$ I get:
$Y_{\mathrm{Diagonalized}} = \left(\begin{array}{ccc} \frac{1}{2} & \frac{1}{2} & 0\\ -\frac{1}{2} & \frac{1}{2} & 0\\ 0 & 0 & 1 \end{array}\right) \,\left(\begin{array}{ccc} 0 & 0 & 0\\ 0 & 2\,X & 0\\ 0 & 0 & 2\,X \end{array}\right)\,\left(\begin{array}{ccc} 1 & -1 & 0\\ 1 & 1 & 0\\ 0 & 0 & 1 \end{array}\right) = \left(\begin{array}{ccc} X & X & 0\\ X & X & 0\\ 0 & 0 & 2\,X \end{array}\right)$
Why this is having non zero entries not only on the diagonal?
"Diagonalizing" $Y$ means finding an invertible matrix $V$ and a diagonal matrix $\Lambda$ such that $Y = V\Lambda V^{-1}$. Writing $Y$ in such a fashion does not change $Y$; if $Y$ was not diagonal before, then it is still not diagonal.
The diagonal matrix that is being associated with $Y$ in this "diagonalization" is $\Lambda$. The relationship between $Y$ and $\Lambda$ is that they are similar matrices. If you like, you make think of the equation $$ \Lambda = V^{-1}YV $$ as saying that "by applying the change of basis described by $V$, we can "make $Y$ diagonal".