While it's a bit of an extreme comparison, they're both weird, unprofessional imagery associated with things you wouldn't wan to associate with a software project.
Wikipedia suggests that there's an association with queer and trans youth, is that what's meant to make the cock-and-balls comparison work? But it also says it has a history back to 17th century Japan...