Why is it that..

you have to pee after sex in order to prevent UTI's?

Edit: I get how all is, let's say, in "the same area" but how does bacteria get in your urethra if the vaginal track is a different system?

After answers: So I guess is recommended to guys to do so too, no?

Thanks! ;)