Some of it might just be guy talk as some men think this away of belonging to the group and demonstrating how manly they are. Call it Trash Talking. Its not very mature at the least. That said, I think its possible that a guy can be that way around his peers, not act on any of it and still be a decent husband. Yes, its inconsistent but life often is. If you take that part of his behavior away, what does the rest look like?