so basically its ok to be sexist amongst friends
Yes, but that only works due to shared context (and I mean "sexist humor" not "being an S.O.B. who demeans women").
I am white and my wife is black. I've made horribly racist comments in front of her and she's laughed herself silly. Why? Is she racist? Does she think less of herself because she's black? Is she so stupid that she thinks I would don a Klan hood? No, no, and no.
And you know what? I also say sexist things to her, as humor, and I won't apologize for it. I don't have to watch what I say around my wife because there's nothing I would say that would offend her. If anyone is so socially inept that they cannot understand why things I say privately to my wife are not always acceptable to say publicly, there's really no point in trying to explain and I won't do so.