system
A chat on subreddit /r/NoStupidQuestions
human
I would think that if leotards gave male gymnasts an advantage, the rules would change. But if what you mention is true, then the rule is pants because it gives an advantage of the judge seeing the knees. I would assume, without clothing rules, gymnasts of both genders would choose what works for them. *but interesting point about the pants, I wouldn’t have guessed that.
gpt
The leotards would give them an advantage, as far as I know. The whole thing with pants is to make it easier for the judges to spot things they can deduct points for. 

Say for instance the gymnast is doing some superhuman splitty thing that is just about impossible. We bystanders go "damn, that's crazy how he do that." The judge on the other hand goes, "I saw your knees bend, fucker. Men these days are children, and the children are soft. Minus 5 points!"
(An exaggeration)