Notice how the "don't hit women" rhetoric is *never* for the benefit of the actual woman herself?
Guys boast about being all tough and ready to fight etc, while also eagerly "I'd never put my hands on a woman bro that's messed up!"
After hearing that said so many times, I eventually realized it's not for the sake of keeping a woman safe from being brutalized by someone twice her size...it's for protecting a man's masculinity. Only a pathetic, weak man would find it worthy to punch down to women. In this case, the word "woman" is practically synonymous with "weak."
Men want to preserve their pride as the stronger sex and therefore only find it worthy to exert their strength towards equals.
The wild twist being: men still hit women all the time. They don't actually follow this supposed rule-- it's more a line they use as a performance of their masculinity and awareness of "guy code."