The purpose of writing great epic of Ramayana, according to the author Valmiki himself, as is obvious from the 4th Sarga of Balakanda, is mainly to convey the philosophy of the Vedas to the public at large and for the dissemination of the Vedic tattva among all:
The essence of the Vedas must become clear to everyone. The quintessence of it must ensure to the benefit of all. With this idea in view, the sons of Sri Rama, namely Luva and Kusha were initiated into the secret lore of Ramayana.
The essence of Vedas:
Sage Valmiki says in the last Sarga of Uttara Kanda of Ramayana that the epic of Ramayana has the form (swarupa) of Gayathri:
Valmiki felt that Ramayana itself contained the philosophical essence of the Vedas and it resembled the form of Gayathri.
The epic contains 24,000 slokas. The incomparable Gayathri mantra contains 24 letters! The 24 letters are seed-letters (beejaksharas) which each of the 1000 slokas makes a commencement. That is how the concept of Gayathri Ramayana (in abbreviated form) has acquired significance.
The beejaksharas of Gayathri constituting the most efficacious of mantras sustain the world in which we live and the worlds beyond. In order to preserve the primordial Vedic vibrations which also sustain the universe, Valmiki created Ramayana on the superstructure of the Gayathri mantra.
The purpose of the Vedas is to give pointers to the profound principle of the Paramatman. Its essence is to propagate the universal principles of Aham Brahmasmi, Prajnanam Brahma, Tattwamasi and Ayamatma Brahma – called the four Maha Vakyas enshrined in the four Vedas.
The message of Ramayana is to propagate the message of Vedas and bring moral and emotional purification in man.
Peace and Prosperity
The function of Gayathri vibration is to protect the Universe by sustaining the element of purity in elemental and non-elemental existence. It brings about peace in the world and harmony in the Universe.
It is heartening to note that the great Sage has brought about a synthesis between Vedic Vision and Ramayana and Gayathri on the other. The very perusal of Ramayana or any portion thereof promotes peace and prosperity among people.
Civilization: The Vedic vision
The ultimate aim of all scriptures in the world, the Vedas and sacred books like the Ramayana, is to spread knowledge and enlightenment, broader visions and perspectives which constitutes the very foundations of sanity and civilization.
A civilization should not be built on narrow philosophies, cultures and creeds or narrow visions. The Vedic vision envisages the basic postulate that every living being in Creation has the spark of divinity and all are equal in the eyes of God. If divinity is basically common to all, it is futile to quarrel among ourselves! Any civilization based on narrow conceptions and conceptual movements is like an oasis in a surrounding desert of savagery. Sooner or later, as Prof. C.E.M. Joad asserts, the desert closes in and the oasis (viz, the civilization) is no more!