legend goes that a woman who had vagina dentata or “teeth” in her vagina (be it a demon or std), castrated her lover’s penis on their wedding night. she asked a blacksmith for help and he made her pretty much an iron dildo to break the teeth off
the tradition celebrates this iron penis, hence its name, festival of steel phallus
in more modern times, sex workers would to go to a shrine to pray for protection from STDs while couples would pray for healthy pregnancies and marriages.
it is also regarded as a fertility festival, where couples would pray for the health of their babies or hope that babies are in the future
the tradition has raised HIV awareness and research efforts in japan so like yeah it’s actually a very neat and positive thing yeah