I myself just took a dumb and was pondering about this effect, and when you balls squinch up when you take a poop and become really tight. Yea, you know what im talking about. Anyway im come to have a theory on this.
Human Beings Have Adapted To Toilets!
If we were to sit down on the shitter, and our balls never scrunched up, and our penis never retracted. We would get poopy water all over ourselves. Therefore I have came to the conclusion that through hundreds of years of evolution, human beings have evolved to the point where when we sit on the toilet our genitals compact to avoid danger.