This is a volcanic rock formation with a history linked to fabled Holy Priest, Kobo-Daishi. It was said that an ancient demon was jealous of the knowledge and wisdom of Kobo-Daishi. The demon dared Kobo Daishi to build a bridge connecting Kushimoto to Oshima Island in one night. Having almost completed the bridge except for the top stones, the demon pretended to be a rooster and faked a morning call, forcing Kobo-Daishi to honor his agreement and not finish the bridge.
Information on this formation is here.