Peeing after sex

Okay so one of my friends says after you have sex to go pee to prevent infection and that one of her friends got a yeast infection after sex cuz she didn't pee. Now I don't think this makes sense because where you pee from and where "it" goes in, are not the same place. I feel as though it would be more logical to shower after. Someone please just enlighten me as to if this is true or not.