Have experienced this with both sexes.
My mother's neighbour is like that. Sometimes his comments can be a bit near the mark, which I put down to nervousness or not knowing his audience. Seems to be a guy thing, where they laugh at their own jokes!
Although, used to work with a woman who behaved like this too. Quickly worked out she was an attention seeker, of an age when she should have behaved more maturely. First time in a meeting with her, she was humming whilst others were talking. Not a recognisable tune, just something to draw attention. Some present couldn't believe it, others brushed it off as "that's ***, as if to excuse her behaviour. Meeting leader not impressed! Of course, she was very popular with most of the guys, or she thought she was.....