Semen contains clotting factors that clump the sperm together with other ejaculate components upon contact with the vagina. This is done as a defensive mechanism for sperm because the vagina is acidic and will kill them before they can do their job. Normally your semen contains other enzymes to reduce the acidity of the vagina and then the lumps of sperm will liquify again to let the sperm.