While not all UTIs are caused by sex (and a UTI would never be classified as a sexually transmitted infection), having sex does increase the risk of getting a UTI, according to the Mayo Clinic . That's because UTIs are caused by bacteria that has no business being in the bladder somehow finding its way up there. And having penetrative sex can easily move bacteria from one part of a person's body (like, near their butt) to another part (like, inside the urethra). Once that bacteria is in the urethra it has only a short distance to travel up into the bladder. That distance is why people who have vaginas get bladder infections way more often than people who have penises, because the penis' urethra is much, much longer so the bacteria don't often make the trip before being flushed out.