It depends on if you have real sex or if you are just screwing around. I'm no expert but I know a man has like a valve that closes the urine canal when you're having real sex.
You're* When your penis is erect the valve thingy is closed and when you pee it tries to stay closed but you force it open and that's why it's so hard to pee.
I think that valve only functions to ensure that semen and urine don't mix. But it's hard to pee when you're hard because the swelling narrows the urethra. My guess is this dude wasn't exactly rock hard.
*yeeeeaaaaaahhh*
(Just to clarify, that was my thoughts after reading the title, not trying to steal the joke)