egreg's answer gives the right fix, but doesn't explain why you get the 'bad' spacing when you use \let in the preamble for older (and only older) TeX Live. Indeed, the console output there (for TL 2025) corresponds to output which doesn't demonstrate the problem raised in the question.
For current LaTeX, using \let in the preamble actually avoids the bad spacing, but it does so in a way you probably do not want.
\documentclass{article}
\usepackage{microtype}
\usepackage{amsmath}
\let\stdeqref\eqref
\begin{document}
\ShowCommand\eqref
\ShowCommand\stdeqref
\begin{equation}\label{a}
A
\end{equation}
This is good spacing: \eqref{a}\allowbreak\eqref{a}
This is bad spacing: \stdeqref{a}\allowbreak\stdeqref{a}
But the bad spacing becomes good if we remove microtype!
\end{document}
With current LaTeX, we have
> \eqref=robust macro:
->\protect \eqref .
> \eqref =\long macro:
#1->\textup {\@nameuse {MT@patch@saved@\string \tagform@ }{\ref {#1}}}.
<argument> \eqref
l.510 \ShowCommand\eqref
?
> \stdeqref=macro:
->\protect \eqref .
<argument> \stdeqref
l.511 \ShowCommand\stdeqref
?
So \stdeqref is defined as the \protect\eqref . That is not a good idea at all if you plan to redefine \eqref. If you redefine it to not be robust, you may retain the original definition, but that would be more by luck than judgement. You do not really want the 'inner' \eqref to diverge from the outer, protected \eqref.
But you do not get the 'bad' spacing here because the inner \eqref is untouched.
If, however, we go back to (updated) TeX Live 2021, we find something different:
> \eqref=\long macro:
#1->\textup {\@nameuse {MT@patch@saved@\string \tagform@ }{\ref {#1}}}.
<argument> \eqref
l.510 \ShowCommand\eqref
?
> \stdeqref=\long macro:
#1->\textup {\tagform@ {\ref {#1}}}.
<argument> \stdeqref
l.511 \ShowCommand\stdeqref
?
Here, we see the timing effect egreg described, which results in the different spacing. This happens because \eqref is not defined as robust here, so there is no 'inner' \eqref . \eqref is just a common-or-garden unprotected macro. As such, \stdeqref gets \let to the same thing and, if this is done in the preamble, microtype's patch is then applied to \eqref but not, of course, \stdeqref.
The reason microtype patches \eqref is because it changes some of the macros \eqref uses. If we compare the pre- and post-amble definitions of \tagform@ when microtype is used, for instance, we find:
> \tagform@=macro:
#1->\maketag@@@ {(\ignorespaces #1\unskip \@@italiccorr )}.
<argument> \tagform@
l.508 \ShowCommand\tagform@
?
(/usr/local/texlive/2021/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def)
(./prawf-1.aux)
(/usr/local/texlive/2021/texmf-dist/tex/latex/microtype/mt-cmr.cfg)
> \tagform@=macro:
#1->\maketag@@@ {\leftprotrusion {(}\ignorespaces #1\unskip \@@italiccorr \righ
tprotrusion {)}}.
<argument> \tagform@
l.514 \ShowCommand\tagform@
That is, when you copy the preamble definition of \eqref, you get a definition which uses a patched version of \tagform@ but is not itself patched to work correctly with this.
To see this is what's happening, you can try:
\documentclass{article}
\usepackage{microtype}
\usepackage{amsmath}
\let\stdeqref\eqref
\makeatletter
\let\stdtagform@\tagform@
\makeatother
\begin{document}
\makeatletter
\newcommand\ostdeqref[1]{%
{\let\tagform@\stdtagform@\stdeqref{#1}}%
}
\makeatother
\begin{equation}\label{a}
A
\end{equation}
This is good spacing: \eqref{a}\allowbreak\eqref{a}
This is bad spacing: \stdeqref{a}\allowbreak\stdeqref{a}
This is good spacing: \ostdeqref{a}\allowbreak\ostdeqref{a}
But the bad spacing becomes good if we remove microtype!
\end{document}

That is, we get bad spacing only when we use a non-patched copy of \eqref with a patched copy of \tagform@. If both or neither are patched, the problem does not occur.
With newer versions of TeX Live, we get the both-patched scenario, essentially by chance, because \let is not really copying the 'inner' definition, as \eqref is now defined as robust.
\letis generally not usable on latex-defined commands, hence\NewCommandCopy\NewCommandCopyin place of\letand the behavior is the same (that is, has the same seemingly incorrect behavior) :/\letdoesn't save the original definition so isn't usable for therenewcommandkinds of use that you indicate are the end use case.