Lymphoscintigraphy is primarily performed to assess the lymphatic system for any abnormalities. It is crucial in diagnosing conditions such as lymphedema, where there is swelling due to lymphatic fluid accumulation. It is also used to detect the spread of cancer by identifying the sentinel lymph node, which is the first node to which cancer cells are likely to spread from a primary tumor.