Windows Dir Command Not Behaving as Expected

In a directory, I have 3 files, all with the incorrect file extension jpgJPG.

When I type dir *.j I get no results, as expected.

When I type dir *.jp I get no results, as expected.

But when I type dir *.jpg it lists the 3 files, even though the extension jpg does not match jpgJPG.

Why is the Dircommand behaving this way?

C:TempMediaOrganizer Test Output with Location2003-10-23 (Temp)>dir
 Volume in drive C has no label.
 Volume Serial Number is 0655-281E

 Directory of C:TempMediaOrganizer Test Output with Location2003-10-23 (Temp)

11/17/2024  10:55 AM    <DIR>          .
11/17/2024  10:55 AM    <DIR>          ..
11/17/2024  10:55 AM           897,472 100_0001.jpgJPG
11/17/2024  10:55 AM           966,582 100_0002.jpgJPG
11/17/2024  10:55 AM         1,115,885 100_0003.jpgJPG
               3 File(s)      2,979,939 bytes
               2 Dir(s)  104,095,875,072 bytes free

C:TempMediaOrganizer Test Output with Location2003-10-23 (Temp)>dir *.j
 Volume in drive C has no label.
 Volume Serial Number is 0655-281E

 Directory of C:TempMediaOrganizer Test Output with Location2003-10-23 (Temp)

File Not Found

C:TempMediaOrganizer Test Output with Location2003-10-23 (Temp)>dir *.jp
 Volume in drive C has no label.
 Volume Serial Number is 0655-281E

 Directory of C:TempMediaOrganizer Test Output with Location2003-10-23 (Temp)

File Not Found

C:TempMediaOrganizer Test Output with Location2003-10-23 (Temp)>dir *.jpg
 Volume in drive C has no label.
 Volume Serial Number is 0655-281E

 Directory of C:TempMediaOrganizer Test Output with Location2003-10-23 (Temp)

11/17/2024  10:55 AM           897,472 100_0001.jpgJPG
11/17/2024  10:55 AM           966,582 100_0002.jpgJPG
11/17/2024  10:55 AM         1,115,885 100_0003.jpgJPG
               3 File(s)      2,979,939 bytes
               0 Dir(s)  104,095,875,072 bytes free

C:TempMediaOrganizer Test Output with Location2003-10-23 (Temp)>