This is a somewhat long explanation (and convoluted!), so to keep it simple: XnviewMP treats .lowercase and .UPPERCASE (or mixed .CaSE) extensions differently, which sorts files into a nonsensical order
- When using Sort by Name, xnview ignores the filename case, i.e. file01.jpg will be listed before FILE02.jpg. Just like the Windows system.

- When using Sort by Extension, xnview will treat lowecase extensions differently from UPPERCASE extensions (or mixed, i.e. .PNG = .pNg = .pNG != .png).

As I tested here, the behavior is really random, I first spotted it because it was placing all files with UPPERCASE extensions before the files with lowercase extensions. Now during the new tests (images above and below created today), the files with different extension cases will be sorted at 'random' either at the beginning\middle or end. Refreshing (F5) will make files alternate position:
- Upon pasting into a new folder

- Refreshed once (the .png and .jpg images will change order)

- Refreshed again (.jpg files will settle and only the .png files will alternate position)

In my tests, I used only a few files, but if I try it on a folder with hundreds of files, the behavior will be similar.
- If I make copies of the images (Select files > Ctrl+C > Ctrl+V) and refresh, their position will change again (the copies "Copy of ..." will be sent to somewhere in the middle of the folder - i.e. between filenames starting with K).
- If I change view to another folder and then come back, their position will change once again and they'll be located somewhere in the beginning of the folder (i.e. between cyrilic filenames, starting with И - which is another anomaly... shouldn't these be listed after the normal chars 0-9,aA-zZ?).
EDIT:
Under Ubuntu (running on VirtualBox), surprisingly, it treats them as equal (Sort by Extension > Ascending)
