The difference is that tikzlibrarycalc.tex.code, the source file loaded by \usetikzlibrary{calc}, begins with line \ProvidesFileRCS{tikzlibrarycalc.code.tex} but tikzlibraryexternal.tex.code doesn't contain any use of \ProvidesFileRCS.
\ProvidesFileRCS{<file>} will eventually call \ProvidesFile{<file>}, which makes the test \@ifl@aded{<ext>}{<file>} works.
If all you want is to detect if external library is loaded, then you can detect if any of commands exclusively provided by it is defined, for example
\ifdefined\tikzexternalize
\expandafter\@firstoftwo
\else
\expandafter\@secondoftwo
\fi
{<loaded>}{<otherwise>}
And if you want to further detect if the externalization is activated, \tikzifexternalizing{<true>}{<false>}, used after \tikzexternalize, is at your service.
Update
I've added an issue to pgf-tikz, see https://github.com/pgf-tikz/pgf/issues/1162. Also I find there're more tikz libraries that lack \ProvidesFileRCS, hence \@ifl@aded is not a reliable detecter for tikz libraries.
Update 2
An example employing @egreg's answer, the accepted answer to the question OP linked.
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{tikz}
\usetikzlibrary{calc}
\usetikzlibrary{external}
\makeatletter
% \IfTikzLibraryLoaded{<lib>}{<true code>}{<false code>}
\def\IfTikzLibraryLoaded#1{%
\ifcsname tikz@library@#1@loaded\endcsname
\expandafter@firstoftwo
\else
\expandafter@secondoftwo
\fi
}
\makeatother
\begin{document}
calc: \IfTikzLibraryLoaded{calc}{loaded}{not loaded} \par
external: \IfTikzLibraryLoaded{external}{loaded}{not loaded}
\end{document}
Output:
calc: loaded
external: loaded
\tikz@library@<lib>@loadedis defined, (still) works. – muzimuzhi Z Jun 01 '22 at 18:46\tikzexternalenableor disable some graphes in my code. I wanted to have an automatic way to include them without errors when I include the same piece of code without externalize. – JeT Jun 01 '22 at 18:58\csname tikzexternalenable\endcsname. – muzimuzhi Z Jun 01 '22 at 19:06