It's basically a meme referencing the "good old days" of traditional gender expression. It's usually used with some amount of irony or sarcasm, but occasionally in earnest. I think the classic phrase was "when men were gentlemen and women were ladies", but in geek circles it's probably better known from Douglas Adams's riff on it:
"In those days spirits were brave, the stakes were high, men were real men, women were real women, and small furry creatures from Alpha Centauri were real small furry creatures from Alpha Centauri."
edit: it also occurs to me that "real men" was probably somewhat (re-)popularized by the 1982 book "Real Men Don't Eat Quiche", which was poking fun at rigid and nonsensical concepts of masculinity, but a lot of people use the pattern of "real men don't X" very seriously.
There was also the internet variant of "The Internet: where men are men, women are men and children are FBI agents" that was doing the rounds since at least the mid-90's.
I thought it was best known from Linus's "do you long for tho days when men were men and wrote their own device drivers" line (from memory; I may have gotten a word wrong).
Just because it's a popular idiom doesn't mean it isn't an unfortunate one.
Your Douglas Adams example does, however, give an example of its use where women are also acknowledged and we can all go home not stinking of casual sexism for the sake of a catchy idiom.