“Just deserts” (sometimes mistakenly spelled as “just desserts”) is an idiomatic expression that means “to get what one’s due reward.”
Why do many people spell it as “just desserts”? It’s because it seems more logical to associate the meaning of the phrase with something sweet and delicious (such as a chocolate cake or a big bowl of ice cream) than with a large, barren stretch of sand dotted with clumps of palm trees. Furthermore, “desserts” and “deserts share the same pronunciation.
Then why is it called “just deserts”? To understand this we need to look at the Latin roots. Desert can mean meaning things. It can mean sand dunes, such as “The camels are built to survive in the desert” and it can also mean abandon, such as “Don’t desert me in my time of need.” All come from the Latin deserere, unfortunately was confused with another Latin word, deservire. Thus, a “just desert” is closer in terms of origin and meaning to the Latin deservire than the Latin deserere.
The confusion between “just desserts” and “just deserts” has made people associate the idiom with the pleasant reward one gets at the end of doing something practical or difficult—for example, getting ice cream for finishing all the brussel sprouts. However, desserts are always pleasant. The true meaning of the idiom reminds us all that a “just desert” can be equally negative—it can be a punishment, or just the unwanted consequence of a particular behavior. In a way, it is like karma, and is just as uncompromising. People get what they deserve, whether they want to or not.