There has to be some basic context outlined. The first would be that The Ramayana is considered to be one of the most important texts in the Hindu religion. Along with the Bhagavad- Gita, The Ramayana helps to provide a guidebook for individuals to live their lives. This becomes the primary motivation of the text. It is a statement of what human beings need to do and how they shall live. In doing so, The Ramayana clearly articulates the path for individuals to follow. Lord Rama is the physical embodiment of the ideal of dharma and adherence to structure that individuals must seek to emulate in as many realms as possible. Being an avatar of Lord Vishnu, Rama is able to construct a state of being by which individuals recognize what they must do in this life. In a setting where evil has become prevalent in being, one of the primary motivations of the text is the idea that human beings can be more and strive for more in this life. It is here where I think that a primary motivation of the text can be evident.
I also think that one of the primary motivations is to clearly articulate how there will be difficulty in this life and how this must be embraced as part of one's dharma. The driving force of The Ramayana is the idea that dharma and adherence to the structure in which individuals keep an eye out on the social maintenance of the world is not easy. It is not to be discarded as simply being in the world. Lord Rama embraces the difficult path in the understanding of what it means to be a creature of this birth. He endures pain and injustice in his banishment and in Devi Sita's abduction. Yet, he never fades in his commitment to what he must do. There is little negotiation in this realm. Through this, Lord Rama clearly understands and recognizes his responsibility as living in this world. This becomes a primary motivation of the the work, seeking to impart to human beings the challenge in being, and in making one subservient to the will of dharma.