In Greek mythology, Priapus (Πρίαπος) was the son of Dionysus and Aphrodite. He is the brother of Hymenaeus, the god of marriage. And just as Zeus shows his thunderbolt, Poseidon his trident, Athena her spear, Apollo his golden arrows, Hermes his caduceus, Hercules his club, so Priapus, wearing a long dress, shameless displays his male genitalia in permanent erection, without which it is said that he is weaponless. The myth of Priapus’ origin asserts that as an unborn child he had a curse placed upon him by jealous Goddess and because of such he was delivered plug-ugly and impotent. In fact, he was so utterly revolting that the other Gods kicked him out of heaven and he fell to Earth where he was raised by Nymphs and Satyrs, a group well-known for their wild animalistic behavior and outrageous sexual exhibitionism. But sadly, as much as Priapus lusted, he could not attain an erection. Then one day something amazing happened, his male appendage grew to enormous size. Unfortunately, besides his erection was permanent, it was said to be so huge that he could not move and thus he became rooted to where he stood. At this point the god Pan carried him off and stood him at the entrance of the woods as a sacred guardian. Then, whenever unwanted visitor dared to wandered too close, Priapus would lift his tunic, brandish his huge weapon, and scare them away. With such a reputation statues of the god Priapus with an enormous phallus became very popular for guarding gates, estates, crossroads and doorways. It was believed that before passing his satyr-like statue a person had to stroke their penis to ensure fruitfulness and luck and, if they didn't, they’d pay the consequences. It is this reason that Priapus later evolved into the protector of all male genitalia.
"This god is worshipped where goats
and sheep pasture or there are swarms of bees;
but by the people of Lampsacus he is more revered than any other god, being called by them a son of Dionysus and Aphrodite." Pausanias