For some reason in KaTeX you have to use \begin{aligned} instead of \begin{align} but it works.

Yes, the aligned environment is a different environment. The aligned environment is available in MathJax too. This environment is meant to be a part of a larger displayed math block, i.e. it goes between \[ and \] or $$ and $$. The align environment, on the other hand, is a standalone environment that can be used outside displayed math block.

While the aligned environment is supported by both MathJax and KaTeX, the align environment is supported by MathJax only.

Huh, I never knew that. Well in any case the differences are minor so you can just replace align with aligned.

Esperent, Isn't the big difference equation numbering? If you actually like to label and eqref stuff, it's not really a replacement. You can get around this I guess, but for me, it's much easier if my basic LaTeX stuff works the same everywhere.