It is a known fact that the same word (same spelling and pronunciation) is used to describe both a rooster and a part of male genitalia (I am not sure how vulgar it would be of me to use the word here, so I will not, just in case).
I always assumed that this is because at some point in history someone thought that there is some similarity between the two, and decided to use name of one for the other. (In my native language, we have exactly that situation, but with a generic word for a bird instead of specific species.) However, it came up today in a discussion with a native English speaker that he believed these were merely homonyms, and there was no relation between meanings.
Hence, I would like to know - what is the relation between the two meanings of the obvious word? Does using the same word for the both the organ and the bird involve a (humorous?) comparison of one to the other?