Ever since civilization began, the civilizations have been overrun by occasional waves of barbarian hordes. Some of our earliest records describe such invasions, and we have fairly detailed information about some of them - the feats of Joshua, the successive waves that flowed over Spain and Britain, the Muslim expansion, and others.
India seems more subject to invasions than most, though, despite being pretty well fortified by natural barriers, and despite having developed a high technological civilization at a very early stage. At one level, this is a direct consequence of it's vast diversity - linguistic, cultural, and political. Conquerors, like Alexander, picked off one small Indian state at a time - India was unable to muster any unified response. Later conquerors, internal and external, relied on the same strategy. Perhaps the Aryans did as well.
Somehow, India failed to develop a collective immune response to foreign invasion.
Perhaps you have guessed that I'm working up to one of my crackpot theories. I will explain it, but first I have to tell how Arun suggested it: he pointed out that the recent troubles in the Balkans might not have occurred if the Serbs hadn't remembered the Battle of the Blackbirds. This suggested to me that history was a crucial ingredient in forming a national identity. He had in mind a negative lesson, but the obverse is the positive lesson. Without the Iliad and the Odyssey, could the Greeks have repelled the Persians? Without Roland, could the Europeans withstood the Islamic challenge?
China developed a strong sense of national identity at an early stage. Ditto Japan.