It's one of my favorite pieces of spelling trivia.
People assume it should be spelled "just desserts" because of the pronunciation. It's spelled "just deserts" because it's an antiquated noun derived from the same root as "deserve" (and it's pronounced like that for the same reason).