The festival has its roots in the pre-modern Edo era, about 250 years ago, when Kawasaki's ladies of the night instituted this celebration of the phallus both to spur business and to pray for protection from STDs. In those days the most feared was syphilis.
Today the main purpose of the festival, besides having fun, is to pray for the conception of a child, or for safe and easy childbirth. The previous preoccupation with syphilis has been replaced with a concern for AIDS, and the festival is very much part of the general AIDS awareness campaign. However, besides the initial queuing at the beginning of the festival in front of the shrine to toss a coin and say a prayer, the rest of the day was spent anything but meditatively.
Perhaps because of the large numbers of foreigners who come to take part, a lot of the program was decidedly untraditional, with country and western line dancing, rock bands and a rapper. In true Japanese style it was mixed in with the thoroughly Japanese float parades, drumming troupes, shamisen players, and procession of dignitaries. Stalls selling booze and food did a roaring trade all day, with the other stalls selling phallic goods from keyrings to candies not doing at all badly either.
For a 90 second overview of this raucous day, check out this video of the Kanamara Matsuri.
Buy Pussy Parties online from GoodsFromJapan.