Srimad-Bhagavatam: Canto 5 - Chapter 1 - Verse 5
मर्त्यावतारस्त्विह मर्त्यशिक्षणंरक्षोवधायैव न केवलं विभो: ।कुतोऽन्यथा स्याद्रमत: स्व आत्मन:सीताकृतानि व्यसनानीश्वरस्य ॥ ५ ॥
martyāvatāras tv iha martya-śikṣaṇaṁrakṣo-vadhāyaiva na kevalaṁ vibhoḥkuto ’nyathā syād ramataḥ sva ātmanaḥsītā-kṛtāni vyasanānīśvarasya
It was ordained that Rāvaṇa, chief of the Rākṣasas, could not be killed by anyone but a man, and for this reason Lord Rāmacandra, the Supreme Personality of Godhead, appeared in the form of a human being. Lord Rāmacandra’s mission, however, was not only to kill Rāvaṇa but also to teach mortal beings that material happiness centered around sex life or centered around one’s wife is the cause of many miseries. He is the self-sufficient Supreme Personality of Godhead, and nothing is lamentable for Him. Therefore why else could He be subjected to tribulations by the kidnapping of mother Sītā?
When the Lord appears in this universe in the form of a human being, He has two purposes, as stated in Bhagavad-gītā — paritrāṇāya sādhūnāṁ vināśāya ca duṣkṛtām: to destroy the demons and protect the devotees. To protect the devotees, the Lord not only satisfies them by His personal presence but also teaches them so that they will not fall down from devotional service. By His personal example, Lord Rāmacandra taught the devotees that it is better not to enter married life, which is certainly followed by many tribulations. As confirmed in Śrīmad-Bhāgavatam (7.9.45): Kṛpaṇas, those who are not advanced in spiritual knowledge and who are therefore just the opposite of brāhmaṇas, generally take to family life, which is a concession for sex. Thus they enjoy sex again and again, although that sex is followed by many tribulations. This is a warning to devotees. To teach this lesson to devotees and to human society in general, Lord Śrī Rāmacandra, although the Supreme Personality of Godhead Himself, underwent a series of tribulations because He accepted a wife, mother Sītā. Lord Rāmacandra underwent these austerities, of course, only to instruct us; actually He never has any reason to lament for anything. Another aspect of the Lord’s instructions is that one who accepts a wife must be a faithful husband and give her full protection. Human society is divided into two classes of men — those who strictly follow the religious principles and those who are devotees. By His personal example, Lord Rāmacandra wanted to instruct both of them how to fully adopt the discipline of the religious system and how to be a beloved and dutiful husband. Otherwise He had no reason to undergo apparent tribulations. One who strictly follows religious principles must not neglect to provide all facilities for the complete protection of his wife. There may be some suffering because of this, but one must nevertheless endure it. That is the duty of a faithful husband. By His personal example, Lord Rāmacandra demonstrated this duty. Lord Rāmacandra could have produced hundreds and thousands of Sītās from His pleasure energy, but just to show the duty of a faithful husband, He not only rescued Sītā from the hands of Rāvaṇa but also killed Rāvaṇa and all the members of his family. Another aspect of the teachings of Lord Rāmacandra is that although Lord Viṣṇu, the Supreme Personality of Godhead, and His devotees may apparently suffer from material tribulations, they have nothing to do with such tribulations. They are mukta-puruṣas, liberated persons, under all circumstances. It is therefore said in the Caitanya-bhāgavata: A Vaiṣṇava is always firmly situated in transcendental bliss because of engagement in devotional service. Although he may appear to suffer material pains, his position is called transcendental bliss in separation (viraha). The emotions a lover and beloved feel when separated from one another are actually very blissful, although apparently painful. Therefore the separation of Lord Rāmacandra from Sītādevī, as well as the consequent tribulation they suffered, is but another display of transcendental bliss. That is the opinion of Śrīla Viśvanātha Cakravartī Ṭhākura.