There’s a study been done into this condition which affects very few men, something around 1 in 2500.
Basically the outcome was that they were all secret massive frustrated gayers. The easy way to explain it is the piss valve switched off and the sex valve switched on due to being in the proximity of a cock. When the other male leaves the valves switch allowing urination more easily.