I don't know if I'd call this discrimination, exactly.
I would imagine that it's more like the case of married priests. In the tradition that has developed in the Egyptian Church, it is completely allowed for a married man to become a priest, and many will tell you that this is in some ways a benefit (in counseling married couples from a place of empathy, for instance), although it's not
necessary that our priests be married. Any man who becomes a priest, however, must be married
before his ordination. The reason for this is more practical than theological, as it would be highly inappropriate for an 'available' man to be looked up to by the single women of the congregation (or their meddling relatives...), as would almost certainly naturally happen. This could place temptation before her that could lead to the appearance or reality of impropriety, or before him in that he might be tempted to use his role as a shepherd of the community as leverage in attempting to court a woman.
These natural urges for companionship would likewise be present in any president in a secular environment, and the potential pitfalls, too, as I can't think of a bigger 'flex' on a man's part than to be able to truthfully approach a woman with the Titanic-sized icebreaker of "Hello; I'm
the president of the United States", nor do I know any woman who would necessarily be immune to such a thing (not that they'd lose their faculties or whatever, but that's a display of status and attendant social capital that few people could even pretend to match).
Or to be more blunt about it: if you are of a certain age, you no doubt remember the (literal) trials of President Clinton and his eventual impeachment for just such an abuse of the office, as his own dalliances were framed. And those are what he would eventually have to admit to having done
as a married man. Can you imagine how much crazier things would've been if he hadn't had even had that most light of social constraints (marriage)?!
Call me old fashioned if you want to, but I think there is a certain wisdom in rejecting a playboy president. It's the Oval Office, not the Presidential Lounge After Dark!