A CT scan with contrast is performed to diagnose various conditions affecting different parts of the body such as the brain, chest, abdomen, pelvis, or blood vessels. The scan provides detailed images of the structures, allowing doctors to detect abnormalities such as tumors, blood clots, infections, or other conditions.