The Bodhisatta was once a golden mallard. All the birds chose him as their king. He had granted his lovely daughter one wish, and she asked to choose her own husband. So the Bodhisatta called all manner of birds to gather. Taken by his beauty, she chose the peacock. Overcome with joy, the peacock spread his wings and began to dance, thus exposing himself. The Bodhisatta shamed the peacock for his lack of decency and gave his daughter to a young mallard instead.
In the Lifetime of the Buddha
The peacock was an earlier birth of a disciple who had amassed many robes, maintained a storeroom full of food, and had his servants come cook for him, despite taking a vow to live a modest life. When the Buddha questioned him about it, the disciple lost his cool. He tore off all his clothes, yelling, “I will go about like this!” and ran away naked to become a layman again.
Later, the Buddha heard some of his disciples discussing the incident and he told them this story so they knew that it was not the first time this disciple’s shamelessness had cost him something valuable.