i see how this men-bashing mechanism might work.
first of all, it's based on stereotypes. stereotypes not neccessarily are the bad thing: they helped us and our ancestors stay safe. for example, "all black and yellow-striped bugs are dangerous". of course not. there are more bugs pretending to be wasps that can't sting and bite at all. but if you have no certain knowledge, avoiding them all is kind of smart.
speaking about men, there really is a kind, that are brought up to be macho - insensitive, sexist and everything your friend bashes. my bet would be was either brought up by one, or was forced to be one, and/or her female relatives were strongly victimised. when her first experience shows those scary macho men, all later met male figures can be perceived as dangerous. in my country, there is a saying "attack is the best defense". maybe this is what's happening?
if you are a friend, you can do better than be offended - you can let her open up and listen why is this. (encourage getting help would be an option)
because this bashing person is doomed to be unhappy, unless she gets some help.
(i hope you understand all this, english is not my 1st language)