A bone biopsy is performed to diagnose the cause of bone abnormalities detected through imaging studies like X-rays, CT scans, or MRI scans. It helps determine whether the abnormality is due to cancer, infection, or other bone diseases. Additionally, it aids in planning the most effective treatment strategy.