> photo1 photo01 photo001 photo0001 photo2
What you enumerated is known as "ascending lexicographical ordering" and has nothing to do with "the shorter representation of the same number", but instead the ASCII[0] character values in each file name.
0 - https://man.freebsd.org/cgi/man.cgi?query=ascii&apropos=0&se...