Within this alleyway is a small shrine for Taira no Makakado, a famous samurai from the Heian period. This was actually the spot where he was beheaded. For awhile, his head hung here for the public to see, but after some time the people of the area feared a vengeful spirit would return. In order to assuage the fears of the people, a famous Monk named Shōnin Kūya held a burial ceremony for the head.
The name Kūya actually means “memorial service for the dead.” This is actually where the name for this alleyway was derived. Shōnin Kūya lived during the Edo period which bears testament to the historical significance of this alleyway.
By the way, Shōnin Kya actually founded a temple called, Rokuharamitsu-ji Temple. It was actually located close to the store which sells the “child-rearing ghost candy.” Did you notice it when you were walking around?