In the Bhagavad-gītā, in the Fourth Chapter, you'll find that Kṛṣṇa was teaching, first-off, imaṁ vivasvate yogaṁ proktavān aham avyayam (BG 4.1). He taught this philosophy to the sun-god. There are two kṣatriya families—sūrya-vaṁśa and candra-vaṁśa. One family's coming from the sun-god, another family's coming from the moon-god. So Kṛṣṇa said, because sun was the principal man in the kṣatriya family of sūrya-vaṁśa. So he was taught first.
- imaṁ vivasvate yogaṁ
- proktavān aham avyayam
- vivasvān manave prāha
- manur ikṣvākave 'bravīt
- (BG 4.1)
So Mahārāja Ikṣvāku, the first king of the dynasty in which Lord Rāmacandra took birth, very pious family. So Ikṣvāku Mahārāja... The worship of Lord Rāmacandra began from Mahārāja Ikṣvāku. Mahārāja Ikṣvāku used to worship the Deity of Rāmacandra, Rāma-Sītā. Therefore in their family Lord Rāmacandra appeared.