The idiom, so spelled, has nothing to do with arid land. Deserts, in this case, comes from the Latin deservire (to serve well) and means deserving treatment for one’s behavior, good or bad. Just deserts can be used in both positive and negative contexts.