A core needle biopsy is performed to diagnose whether a suspicious area is cancerous. It helps doctors determine the type of cancer, its grade, and sometimes its molecular characteristics. This information is crucial for developing an effective treatment plan.