The Bodhisatta was once an ascetic. He lived alone in the Himalayas, though a band of carefree ascetics lived nearby. Rather than work toward religious ecstasy, they mostly sat around laughing and joking together. Their pet monkey was as vulgar as they were.
One time when the carefree ascetics traveled to a town to get salt and seasonings, the Bodhisatta took up residence in their monastery. When the monkey tried to play a prank, the Bodhisatta told him he ought to behave properly from now on, and the monkey did so.
Even after the Bodhisatta left their home, the monkey remained virtuous. He told his keepers that he had learned proper behavior from the Bodhisatta and was now interested in meditating. The uncouth ascetics said they no longer liked him because he was boring, and no matter how hard he tried he would never learn to meditate because he was just a monkey.
In the Lifetime of the Buddha
The uncouth ascetics were earlier births of some of the Buddha’s disciples who one day were being loud and obnoxious in a room below where he was sitting. The Buddha asked Moggallana, one of his top disciples, to quiet them down. Moggallana floated in the air and touched the house’s foundation with his big toe, which caused it to shake so violently the disciples ran outside in fear.
Sometime later, the Buddha heard some other disciples discussing how the loud disciples behaved badly and did not grasp core concepts like impermanence. He told this story so people knew they had been the same way in the past.