The primary purpose of a bone marrow biopsy is to diagnose or monitor diseases that affect the bone marrow and blood cells. These include both malignant (cancerous) and benign (non-cancerous) conditions. It helps in determining the stage and extent of cancer, and can also be used to evaluate the effectiveness of ongoing treatment.