The problem here is non-formal social opportunities that aren't meetings and don't take the place of meetings. If there's solid work-related content to discuss then of course you can meet with someone and discuss it, but that's not the same as grabbing dinner with someone when you're both working late and chattering about career-related stuff.
> Also: do you offer to mentor the "not pretty" females? That statement alone in your post shows a remarkable immaturity in you about women in the workplace.
Of course I do, I mentor anyone who asks to be mentored. Formal work relationships like mentoring aren't a problem because they're explicitly endorsed by the company and usually facilitated by a manager or initiated by the mentee. I worry that I'm being too condescending as a mentor because of implicit bias, or overcompensating in the direction of not giving enough help, but that's a different problem.
"Am I doing this because she's pretty?" is relevant to the conversation about this article because creepy behavior by men who are attracted to women seems to be a core complaint of professional women and a part of the #MeToo movement, and men are asked to be aware of their own biases and motivations and actions to try to fix this.