The reason I say this is that I was recently job interviewing and I had one company that acted like this, and even brought me into a Friday happy hour as part of the interview process, where a bunch of young males were playing beer pong. First of all, how is that not a hostile environment for a woman? Secondly, I didn't want to drink, so was I supposed to look like I was no fun or bend my principles? Finally, when I complained to the recruiter, I was told they _only_ did that for engineers, and it was clear to me that it was a general strategy of indoctrination to avoid paying market rate, because it was all fun and games until we started talking compensation. And the company I most recently worked with before was more or less the same, the startup industry is filled with companies exactly like this.
We have a culture of brogrammers because the VCs create it to avoid paying engineers. And if you think programmers are all men, take a look at the VC and senior management gender diversity sometime.
Your example of being invited to a bar after an interview is a perfect example. It's right on the edge of what could be considered professional, at least assuming you were in Silicon Valley where such things are presumably somewhat common. Many candidates might find this very appealing, while many might find it extremely off-putting or even hostile. Personally, I would be closer to the off-putting side, although that might not have been true 5 years ago. I'm not a female, but I can certainly imagine it feeling incredibly off-putting or hostile.
I don't approve of this situation, but I also don't buy your general argument (especially for things like ping pong tables and beer on tap). You seem to be referring to "professionalism" as some concrete normative standard, but in reality, what is considered "professionalism" changes over time and differs between people, industries, and geographic regions at any given time.