When a solid is heated, some atoms or ions may leave the crystal lattice. As a result, vacancies are created and this leads to vacancy defects in the crystalline solid. Since the number of atoms/ions per unit volume decreases, the vacancy defects lead to decrease in the density.