This is because lattice energy is proportional to the ionic charges (+1/-1). So, compared to MgO (+2/-2), NaCl has a low lattice energy.