The ultimate purpose of Vedic literatures is to bring the living entity back to his original consciousness.
“As explained in Bhagavad-gītā (2.42-43):
yām imāṁ puṣpitāṁ vācaṁ pravadanty avipaścitaḥ
veda-vāda-ratāḥ pārtha nānyad astīti vādinaḥ
kāmātmānaḥ svarga-parā janma-karma-phala-pradām
kriyā-viśeṣa-bahulāṁ bhogaiśvarya-gatiṁ prati
“Men of small knowledge are very much attached to the flowery words of the Vedas, which recommend various fruitive activities for elevation to heavenly planets, resultant good birth, power, and so forth. Being desirous of sense gratification and opulent life, they say that there is nothing more than this.”
On the other hand, certain parts of Vedic literature are specifically meant to award material sense gratification to the conditioned soul and at the same time gradually condition him to obey the Vedic injunctions. The portions of the Vedas that recommend fruitive activities for regulated sense gratification are themselves dangerous, because the living being who engages in such activities becomes easily entangled in the material enjoyment offered and neglects the ultimate purpose of the Vedas. The ultimate purpose of Vedic literature is to bring the living entity back to his original consciousness, in which he acts as an eternal servant of the Supreme Personality of Godhead. By rendering service to the Lord, the living entity can enjoy unlimited spiritual bliss in the association of the Lord in His own kingdom. Thus, one who seriously desires to advance in Kṛṣṇa consciousness should specifically hear the Vedic literature that deals with pure devotional service to the Lord. One should hear from those who are highly advanced in Kṛṣṇa consciousness and avoid interpretations that stimulate materialistic desires for enjoyment.
When the tiny living entity is finally able to see the difference between the temporary affairs of this world and the transcendental activities of Lord Trivikrama, Kṛṣṇa, he devotes himself to the Lord and removes from his heart the dark covering of matter, no longer desiring sense gratification, which is enjoyed under the two headings sin and piety. In other words, although people within this world are considered sinful or pious, on the material platform both sin and piety are performed for one’s personal gratification. If one can understand that his real happiness lies in giving pleasure to Kṛṣṇa, Lord Kṛṣṇa takes such a fortunate living being back to His own abode, which is called Goloka Vṛndāvana. According to Bhaktisiddhānta Sarasvatī Ṭhākura, the Lord first gives a sincere soul the opportunity to hear about His pastimes. When the devotee has advanced in his spontaneous attraction to such narrations, the Lord gives him the opportunity to take part in His spiritual pastimes as they appear within this world. By taking part in the pastimes of the Lord within a particular universe, the living being becomes completely detached from the material world, and ultimately the Lord brings him to His personal abode in the spiritual sky.”
Source: A.C. Bhaktivedanta Swami Prabhupada (2014 edition), “Srimad Bhagavatam”, Eleventh Canto, Chapter 01 – Text 06-07.