Srimad-Bhagavatam: Canto 1 - Chapter 1 - Verse 25
भेजिरे मुनयोऽथाग्रे भगवन्तमधोक्षजम् ।सत्त्वं विशुद्धं क्षेमाय कल्पन्ते येऽनु तानिह ॥ २५ ॥
bhejire munayo ’thāgrebhagavantam adhokṣajamsattvaṁ viśuddhaṁ kṣemāyakalpante ye ’nu tān iha
Previously all the great sages rendered service unto the Personality of Godhead due to His existence above the three modes of material nature. They worshiped Him to become free from material conditions and thus derive the ultimate benefit. Whoever follows such great authorities is also eligible for liberation from the material world.
The purpose of performing religion is neither to profit by material gain nor to get the simple knowledge of discerning matter from spirit. The ultimate aim of religious performances is to release oneself from material bondage and regain the life of freedom in the transcendental world, where the Personality of Godhead is the Supreme Person. Laws of religion, therefore, are directly enacted by the Personality of Godhead, and except for the mahājanas, or the authorized agents of the Lord, no one knows the purpose of religion. There are twelve particular agents of the Lord who know the purpose of religion, and all of them render transcendental service unto Him. Persons who desire their own good may follow these mahājanas and thus attain the supreme benefit.