It is important to wear sunscreen when exfoliating because shedding dead skin without sunscreen can lead to skin damage as the new skin is exposed to the sun's harmful rays.