Yeah, order is not guaranteed by the POSIX standard, and the Linux manpage warns about it:
The order in which filenames are read by successive calls to
readdir()
depends on the filesystem implementation; it is unlikely that the names will be sorted in any fashion.