Sex can sometimes lead to unexpected discomfort—not because of shame or wrongdoing, but because of how the body works. Warmth, friction, and moisture during intimacy can allow bacteria to move more easily toward the urinary tract, especially in women.