The amsmath package secures away the original \mathcode of the minus and equal signs, and subsequently uses the saved values in the macros that provide the extensible arrows (e.g., \leftarrowfill@). Indeed, at lines 893–900 of amsmath.sty we read
\mathchardef\std@minus\mathcode`\-\relax
\mathchardef\std@equal\mathcode`\=\relax
\AtBeginDocument{%
\mathchardef\std@minus\mathcode`\-\relax
\mathchardef\std@equal\mathcode`\=\relax
}
\ams@def\relbar{\mathrel{\mathpalette\mathsm@sh\std@minus}}
\ams@def\Relbar{\mathrel\std@equal}
Why does it do so? What problem are the package authors trying to avoid here?

\operatornameand related things. – egreg Feb 04 '17 at 17:37\std@equal, then? As far as I can see,\newmcodes@does not redefine the\mathcodeof=. – GuM Feb 04 '17 at 17:47\std@minusin\newmcodes@, which I deem wrong and, indeed, it can break in certain circumstances, see http://tex.stackexchange.com/a/299805/4427 – egreg Feb 04 '17 at 17:52\std@minusis redefined again inside\newmcodes@! – GuM Feb 04 '17 at 18:24