Why is it important to preserve the parathyroid glands in thyroid surgery?