Why is having sex more likely to transfer viruses and bacteria than any other types of bodily contact?

Excellent question. Because the organisms live in the semen or vaginal secretions and are expelled onto mucous membranes or slightly damaged skin surfaces where they are able to attached to tissues and grow. Many of the most successful microorganisms are transmitted sexually.