There are many conditions that may be spread by sexual contact but have not neccessarily been 'caught' by sexual contact. They may have occurred naturally, such as thrush, or may have been transmitted some other way, such as HIV though the blood.
some of what are called sti's can be contracted in other ways drug or tatatoo needles can easily be the source of hepatitis c infection as well as sharing a straw or note to snort cocaine. clymidiah can be contracted through contact with lambing ewes. a baby can contract hiv or syphilis in the womb.