You are using the Anki desktop app on a Mac. The macOS filesystem is case insensitive by default. So, when the Anki app looks for a filename with a specific spelling of upper and lowercase characters, the operating system ignores case when finding a matching filename.
You can see an example of this behavior in Terminal:
% touch FILE.txt
% ls -l file.txt
-rw-r--r-- 1 myusername wheel 0 Aug 2 08:29 file.txt
% ls -l file.TXT
-rw-r--r-- 1 myusername wheel 0 Aug 2 08:29 file.TXT
% ls -l
total 0
-rw-r--r-- 1 myusername wheel 0 Aug 2 08:29 FILE.txt
By contrast, the iOS filesystem is case sensitive.