Then I looked at it more carefully, and realized... it was correct. It's just that the order of the days of the week is so ingrained in my head that it looks completely Wrong for friday to come before monday! It's like they are numbers. They have their order already, and it's not alphabetical.
So I added a few new days of the week, to make the output easier to read and believe.
Unsorted: Sunday Monday Tuesday Wednesday Thursday Friday Saturday Appleday Zebraday Doomsday Humpday Alpacaday
Sorted: Alpacaday Appleday Doomsday Friday Humpday Monday Saturday Sunday Thursday Tuesday Wednesday Zebraday
Later I was mulling over this mental phenomenon, the fact that alphabetizing a list can remove order instead of imposing it. "The problem is that days of the week are like numbers," I thought. Then of course I wondered - what would an alphabetized list of numbers look like? Good thing I have a handy little program that alphabetizes things.
Unsorted: one two three four five six seven eight nine ten eleven twelve thirteen
Sorted: eight eleven five four nine one seven six ten thirteen three twelve two
Those look really wrong to me too. It's hard to read them as letters, not numbers, and acknowledge that they're really in the correct order.
It reminds me of a brain-teaser I've seen in a few places, where the words of colors are colored incorrectly. It can be hard to say the color of the text, instead of reading the text. Like this:
blue yellow purple green black
Interesting how the brain works!