I guess it depends of what OS you are using.
Windows based systems don’t care about case. So, if I upload Lee.jpeg and lee.jpeg, they are essentially the same filename.
When you upload a file via Magento, the Varien_File_Uploader class does all the work finding a home for a file. You give it a base directory and list of valid extensions. You can also set a flag to make is use ‘dispersion’. When you tell it to use dispersion, it takes the first 2 letters of the filename and makes a directory structure.
lee.jpeg -> /l/e/lee.jpeg
Bob.jpeg -> /B/o/Bob.jpeg
Well, on a UNIX system case matters. So the directory /B/o is NOT the same as /b/o
Window doesn’t care about case. /B/o === /b/o
Now to what is probably happening for you.
You are probably uploading mixed case files.
The first file you upload is ‘lee.jpeg’, that becomes ‘/l/e/lee.jpeg’
The second file you upload is ‘LEland.jpeg’, that becomes ‘/l/e/LEland.jpeg’ in windows and ‘/L/E/LEland.jpeg’ in UNIX
The reason is that windows thinks /L/E === /l/e and says the directory already exists. So, Magento uses /L/E/LEland.jpeg and windows saves it in /l/e/LEland.jpeg
Magento should probably lowercase every filename to cover edge cases between windows and UNIX to be honest.
Of course, I could be totally wrong and you should just ignore everything I just said in that case.