What to Know
Despite its pronunciation, just deserts, with one s, is the proper spelling for the phrase meaning "the punishment that one deserves." The phrase is even older than dessert, using an older noun version of desert meaning "deserved reward or punishment," which is spelled like the arid land, but pronounced like the sweet treat.
Based on the way the second word in just deserts (“the punishment that one deserves”) is pronounced one would be forgiven for imagining that it came about in reference to some form of discipline involving custards, cookies, or petits fours. It might even make one wonder why there are not other meal-based forms of chastisement in our language; why no deserved breakfasts, no requisite lunches, no warranted teas? Because it’s not that kind of dessert.
The English language is fond of occasionally embracing its whimsical and illogical side, in order to keep things interesting for the people who attempt to use it. For instance, the most common noun form of desert (“arid land with usually sparse vegetation”) is pronounced the same way as the adjectival form of this word (“desolate and sparsely occupied or unoccupied”) play , but not the same way as the verb (“to withdraw from or leave usually without intent to return”), even though all three words come from the same source (the Latin deserere, “to desert”). The verb desert is pronounced the same way as the dessert you eat after dinner play (which comes from the Latin servir, “to serve”). And, to make things even more interesting (by which we mean confusing), there is another noun form of desert, spelled the same as the “arid land” word, but pronounced like the thing one eats after dinner, and with a meaning that is similar to neither.
History of 'Just Deserts'
Just deserts uses this, relatively uncommon, noun form of desert, which may mean “deserved reward or punishment” (usually used in plural), “the quality or fact of meriting reward or punishment,” or “excellence, worth.” This desert and dessert are etymologically related, although the former is quite a bit older; the punishment sense had already been in use for several hundred years by the time we got around to adopting the after-dinner word dessert around 1600. In fact, the use of just deserts predates that of dessert, as it came into use in the middle of the 16th century.
I haue bene yonge and am nowe olde, yet the eies in myne heade:
Dyd never se the juste deserte, nor hys seede begge theyr breade.
— Robert Crowley, The Psalter if David, 1549
In this warre Alexander was made Capitayne of one of the battailles, wherein his noble hert and courage did well apeare, specially when it came to the stroke of the fight, for there he acquited him self so valiauntly yt he semed not inferiour vnto his father, nor to any man els, but by moste iuste desert got the honour of the victory.
— Quintus Curtius (trans. by John Brende), The history of Quintus Curcius, 1553
Unto kynges and princes we gyue due obeysaunce, by whose gouernaunce and furtheraunce they haue bin ayded, to perfurme theyr attemp|tes. we commende bothe, and for theyr iust desertes worthely extoll them.
— Pietro Martire d’Anghiera, The decades of the newe worlde, 1555
In early use desert was often used in the singular, and just desert might not refer to a punishment, but to anything that was deserved. In modern use it is typically found in the plural, and just deserts almost always is in reference to a deserved punishment, rather than a reward. And remember that just deserts has nothing to do with post-prandial sweets, unless it is that the punishment that you deserve is to receive none of these things.