A needle biopsy is typically performed to investigate the cause of abnormal bleeding, pelvic pain, or to assess abnormalities detected during imaging studies, such as an ultrasound or MRI. It helps in diagnosing conditions like endometriosis, fibroids, and various types of cancer.