I have seen men give them out for both girls and boys as well. Don't think it has anything to do with the child being male. I do believe, like Merry Andrew it was a tradition started back when smoking cigars was a common thing.
Maybe it is on some level Green Witch...but it has nothing to do with the birth of a
boy baby.