Sex can have important consequences, like getting sick or getting pregnant.