Its called a "gay tail". As far as genetics go I don't believe it is genetically inherited, just my opinion though and that is because I had a dog that had a gay tail, the only one out of the litter with a gay tail and the dogs sire and dam didn't have gay tails and the generation before that didn't have gay tails. I think it is more an "it happens" type of thing.