A friend of mine is some kind of leader in border patrol. He said that he knows he is in real trouble the moment his dudes stop trash talking him. In most sausage fests it's like this. Offensive remark is actually flattering, as it's completely based on assumption that the receiving party is confident enough to take the joke.
It's at least seemingly male cultural phenomena. Or alternatively women are really really careful about it.