Deserts have extreme temperature variations because they lack vegetation and moisture to retain heat. During the day, the sun's rays heat up the barren terrain quickly, causing high temperatures. At night, without vegetation to hold the heat, the desert loses heat rapidly, leading to cold temperatures. This cycle of rapid heating and cooling results in the extreme temperature variations experienced in deserts.