Sense of "waterless, treeless region" was in Middle English and gradually became the main meaning. Commonly spelled desart in 18c., which is not etymological but at least avoids confusion with the other two senses of the word. Classical Latin indicated this idea with deserta, plural of desertus.

"suitable reward or punishment" (now usually plural and with just), c. 1300, from Old French deserte, noun use of past participle of deservir "be worthy to have," ultimately from Latin deservire "serve well" (see deserve).