system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: How did diseases that are only transmitted Sexually originate ?
gpt
Most infectious human diseases, not just STDs, originally came from animals.  Often domestic animals, but sometimes wild animals as well.  The flu, TB, etc., come from pigs, chickens, and cattle.  HIV came from wild apes or monkeys, and Ebola is thought to have come from bats.

Most STD's weren't originally only transmitted through sex.  But as people's standards of living and hygiene improved, some diseases became less likely to be transmitted through non-sexual contact.  And they're now mainly spread by sex, so they became sexually transmitted diseases by default.

Examples:

HIV probably spread to humans from primates when people killed and butchered monkey or ape meat.  It also may have spread through mass vaccinations in colonial Africa.  It spread through blood transfusions in North America.  But once people paid closer attention to keeping the blood supply clean and keeping needles clean, HIV mainly only spreads through sex.

Syphilis used to spread by skin to skin non-sexual contact, especially in the tropics.  But in colder countries where people wore more clothes, syphilis mainly spread through sexual contact and was concentrated in the genital area, one of the parts of the body that tended to stay warm in the winter.

Same goes for chlamydia and gonorrhea.  They used to spread through non-sexual contact.  Children caught the diseases from touching each other and playing with each other.  But since hygiene and living standards have improved, they mainly only spread through sex now.