Fourier Transformations Reveal How AI Learns Complex Physics