Synovial fluid analysis is performed to diagnose the cause of joint inflammation, pain, and swelling. It helps in identifying conditions such as osteoarthritis, rheumatoid arthritis, gout, pseudogout, septic arthritis, and other inflammatory or infectious conditions of the joints.