Sastras are not easily understood by all and the Lord incarnates time and again to reinforce their importance and also to show by example how to lead life in accordance to dharma. In Rama avatar, Rama's entire life provides practical lessons on dharma for all to follow. In Krishna avatar, He teaches the essence of the entire Upanishads in the most comprehensive manner in the Bhagavad Gita. All this is done out of His compassion for the jivatmas who are caught in the deep ocean of samsara and are struggling to get out of it, pointed out Sri Asuri Madhavachariar in a discourse. Moreover, in the course of the cyclic passage of Time, when the yugas Krita, Treta, Dwapara and Kali follow in succession, it is seen that there is a steady decline in the quality of dharma practised by people living in the respective times.
For instance, at the close of Dwapara Yuga itself the signs of Kali Yuga had begun to manifest in subtle ways and Krishna is concerned that the wealth of knowledge of dharma sastras should reach the people of Kali Yuga. He decides that the great soul Bhishma, who is well versed in the sastras and also has the ability to expound the subtleties with clarity, should expound these. He urges Yudhishtira to seek clarifications on dharma from Bhishma. He accompanies the Pandavas to visit Bhishma who is in his bed of arrows awaiting the Uttarayana Punya Kala to give up his body. The Lord also listens to Bhishma's rendering of the dharma sastras, thereby setting an example to all.
It is by listening to the teachings of acharyas, preceptors, etc, and by contemplating on these matters, that one is able to gain greater clarity of thought and vision. The purpose of knowing dharma sastras is to realise that by upholding them in life one moves in the direction of salvation.