Begin and end work outside of math mode
The dollar signs are not the only delimiters that MathJax looks for. Because environments like \begin{align}...\end{align} also introduce math mode (they don't require other delimiters in LaTeX), MathJax also processes any \begin{xyz}...\end{xyz} pairs as math delimiters. So even though you haven't closed your dollar signs, MathJax picks up on the \begin{cases}...\end{cases} and thinks they are math delimiters, so processes the contents. That is why you are seeing part of your expression processed by MathJax.
An unclosed math-mode delimiter swallows some backslashes
It's not MathJax that's doing it, it is the Markdown processing. The \% has been turned into % in the page source, and so the rest of that line (2 = 0$ (even)}) is considered by MathJax to be a comment. Note also that the final \\ has been turned into a single slash. It used to be that the preview code was set up to work the same as MathJax in terms of determining what is math and what isn't, but that seems to have diverged over time. So the preview doesn't realize this is math, and so is performing Markdown substitutions. I suspect the unclosed $$ is confusing the preview.