Historically I'd like to add that FileNames are just sequences of bytes that come with a few restrictions.
They don't even have an encoding you can use to sort something. Windows FileNames look like UTF-16, but they can be truncated. You can't convert them to UTF-8 and back without loss. (For that you need WTF-8)
Once you use random FileNames you'll start to notice...