The Coombs test is performed to diagnose conditions such as autoimmune hemolytic anemia, hemolytic disease of the newborn, and transfusion reactions by detecting free antibodies which attack the red blood cells, aiding in accurate diagnosis and appropriate treatment.