Consider the following files main.tex and xyz.tex:
% main.tex
\documentclass{article}
\begin{document}
\newcommand\abc{XYZ.tex}
\input{\MakeLowercase{\abc}}
\end{document}
% xyz.tex (all lowercase letters)
Hey, it works!
LaTeXing main.tex works under Windows (would even work without trying to lowercase the filename, as filenames are case-insensitive), while under Linux, it gives the error
! LaTeX Error: File `MakeLowercase {XYZ.tex}' not found.
Question: Why does it work under Windows, even though \MakeLowercase is not expandable? Shouldn't we expect identical behavior across OSes? What would it take to treat macros the same in both cases?
(I know how to achieve the desired effect of lowercasing the filename, by using e.g. \explower from the post Expandably change letter case and use inside \csname, without a package.)