Thyroid biopsy is performed to definitively determine whether a nodule detected in the thyroid gland is benign or malignant. These nodules are typically identified through methods such as physical examination, ultrasonography, or radioactive thyroid scan.