Rainbows come into play because of the treasure leprechauns supposedly hide. Folklore suggests that these cunning creatures bury their pots of gold at a rainbow's end to keep it hidden from humans.