In the earlier verses, Shri Krishna glorifies the knowledge he has given to Arjuna thus far. He tells Arjuna that he has given the same knowledge to the Sun God who has given it to Manu. Manu gave it to Ikshvaku, Ikshvaku to Nimi, and so on. It was passed down from one king to another as a tradition to a lineage of kings. Over time, the knowledge got lost because it was passed to people who were not fit students. They had their own shortcomings and couldn’t transfer it in the true essence.
Arjuna then asked Shri Krishna how he is to understand when Shri Krishna says he taught Vivasvan. Vivasvan was there from the beginning of time, but Shri Krishna is almost the same age as Arjuna.
Chapter 4, Verse 5
रीभगवानुवाच
बहूनि मे व्यतीतानि जन्मान तव चार्जुन ।
तान्यहं वेद सर्वाणि न त्वं वेत्थ परन्तप ॥४.५॥śrībhagavānuvāca
bahūni me vyatītāni janmāni tava cārjuna,
tānyahaṁ veda sarvāṇi na tvaṁ vettha parantapa. (4.5)4.5. The Supreme Lord said: Both you and I have had many births, O Arjuna. I remember them all but you do not know them O Parantapa (scorcher of foes).
Shri Krishna says that he, Arjuna, and everyone else had many embodiments before this present embodiment. But the difference is that Shri Krishna remembers all the births but Arjuna does not.
Who we are today is not accidental. We all had many many lives before this. Through this present body and environment, we are exhausting all our past tendencies. These include physical, emotional, and mental tendencies that we have accumulated over many births. We are all constantly moving toward a direction to fulfill some desire or the other. We can’t fulfill all our desires in one lifetime because of physical limitations or because of the environment. So, we seek out a new body.
Chapter 4, Verse 6
अजोऽपि सन्नव्ययात् भूतानामीश्वरोऽप सन् ।
प्रकृतिं स्वामधिष्ठाय सम्भवाम्यात्ममायया ॥४.६॥ajo’pi sannavyayātmā bhūtānāmīśvaro’pi san,
prakṛtiṁ svāmadhiṣṭhāya sambhavāmyātmamāyayā. (4.6)4.6. Although I am unborn, am the Lord of all beings, and am of imperishable nature, yet, ruling over My own nature, I take birth by My own Maya.
Birth is to gain a body for the expression of the mind to exhaust past tendencies (vasanas). Decay of the body is death. The Lord has no past tendencies to exhaust. He is changeless, unborn (unconditioned by time), and imperishable. Shri Krishna explains that he is the Lord of all beings. Yet, he manifests as a form into the world. He does this with his own creative potential, the power of Maya. Thus, he knows all his past embodiments and we do not.
Chapter 4, Verse 7
यदा यदा हि धर्मस्य ग्लानिर्भवति भारत ।
अभ्युत्थानमधर्मस्य तदात्मानं सृजाम्यहम् ॥४.७॥yadā yadā hi dharmasya glānirbhavati bhārata,
abhyutthānamadharmasya tadātmānaṁ sṛjāmyaham. (4.7)4.7. Whenever there is a decline in righteousness, O Bharata (Arjuna), and an increase in unrighteousness, at that time I manifest Myself.
When does the Lord project himself into the world?
Whenever unrighteousness is on the rise with the decline in good/righteousness, then the Lord manifests as a form in the world (avatara). He becomes a part of our world to teach and show us the path to evolve.
Chapter 4, Verse 8
परित्राणाय साधूनां विनाशाय च दुष्कृताम् ।
धर्मसंस्थापनार्थाय सम्भवामि युगे युगे ॥४.८॥paritrāṇāya sādhūnāṁ vināśāya ca duṣkṛtām,
dharmasaṁsthāpanārthāya sambhavāmi yuge yuge. (4.8)4.8. To protect the good, to destroy the wicked, and to reestablish righteousness I am born age after age.
From time to time the path of evolution gets blocked by the atrocities of the wicked and the cruel. At that time, Shri Krishna says he takes on a form to protect the good. He reestablishes righteousness by destroying the unrighteous.
Manifestation of the Lord can happen in any form to pave the way for cultural or evolutionary revival. This happens in cycles in the flow of time.