What is the Purpose?
Kimattha Sutta  (AN 11:1)

I have heard that on one occasion the Blessed One was staying near Sāvatthī in Jeta’s Grove, Anāthapiṇḍika’s monastery. Then Ven. Ānanda went to the Blessed One and on arrival, having bowed down to him, sat to one side. As he was sitting there he said to the Blessed One: “What is the purpose of skillful virtues? What is their reward?”

“Skillful virtues have freedom from remorse as their purpose, Ānanda, and freedom from remorse as their reward.”

“And what is the purpose of freedom from remorse? What is its reward?”

“Freedom from remorse has joy as its purpose, joy as its reward.”

“And what is the purpose of joy? What is its reward?”

“Joy has rapture as its purpose, rapture as its reward.”

“And what is the purpose of rapture? What is its reward?”

“Rapture has calm as its purpose, calm as its reward.”

“And what is the purpose of calm? What is its reward?”

“Calm has pleasure as its purpose, pleasure as its reward.”

“And what is the purpose of pleasure? What is its reward?”

“Pleasure has concentration as its purpose, concentration as its reward.”

“And what is the purpose of concentration? What is its reward?”

“Concentration has knowledge & vision of things as they have come to be as its purpose, knowledge & vision of things as they have come to be as its reward.”

“And what is the purpose of knowledge & vision of things as they have come to be? What is its reward?”

“Knowledge & vision of things as they have come to be has disenchantment as its purpose, disenchantment as its reward.”

“And what is the purpose of disenchantment? What is its reward?”

“Disenchantment has dispassion as its purpose, dispassion as its reward.”

“And what is the purpose of dispassion? What is its reward?”

“Dispassion has knowledge & vision of release as its purpose, knowledge & vision of release as its reward.

“Thus in this way, Ānanda, skillful virtues have freedom from remorse as their purpose, freedom from remorse as their reward. Freedom from remorse has joy as its purpose, joy as its reward. Joy has rapture as its purpose, rapture as its reward. Rapture has calm as its purpose, calm as its reward. Calm has pleasure as its purpose, pleasure as its reward. Pleasure has concentration as its purpose, concentration as its reward. Concentration has knowledge & vision of things as they have come to be as its purpose, knowledge & vision of things as they have come to be as its reward. Knowledge & vision of things as they have come to be has disenchantment as its purpose, disenchantment as its reward. Disenchantment has dispassion as its purpose, dispassion as its reward. Dispassion has knowledge & vision of release as its purpose, knowledge & vision of release as its reward.

“In this way, Ānanda, skillful virtues lead step-by-step to the consummation of arahantship.”

See also: DN 2; MN 24; MN 44; SN 12:23