Spinal fusion surgery is performed to stabilize the spine by joining two or more vertebrae together. It is commonly used to treat conditions such as spinal instability, degenerative disc disease, spondylolisthesis, and spinal deformities like scoliosis.