This is related to issue #16330: rustc invokes other programs underneath (most notably, a linker) which recognize environment variables of their own. A prominent example would be the LIB variable that is recognized by Microsoft link.exe (and lld-link) which is what, as I understand, is used by rustc on Windows.
Having an accurate list of environment variables that can affect the result of compilation is important to build systems that track changes to the environment.