This is not really an issue across the entire software industry, but rather a particular subset: the Silicon Valley (and sometimes New York City) startup run by people in their 20s who think they are going to reshape the software industry (if not the entire world.) Bad attitudes also persist into video game development studios, though the environments are perhaps not as bad. I'm sure it varies a lot from place to place.
Larger and more mature software organizations are by nature far more risk-averse, so they tend to take reports of harassment far more seriously. I have a friend who got fired outright because he pulled a silly prank that could have reasonably been construed as sexual harassment. He didn't really mean anything by it, but it was 100% his bad and a justified termination.
When people talk about "professionalism" in software development, I think the common assumption is that it refers mainly to things like writing good code and putting in enough work on a daily/weekly basis, rather than crossing over into one's general conduct and particularly attitudes toward women and minorities in the workplace. The sorts of environments that have problems with harassment tend to be overwhelmingly white, male, and young. This is a bad combination if you want to attempt to have a professional working environment, and especially if you want to branch out to have a more diverse workforce.
Being a professional is about much more than mere competence at one's job duties. It also has to do with how you resolve interpersonal conflict, how you interact with people who may not share your worldview or experience, and whether you can do your job without being a huge asshole about it.