(This post has been written based on my received knowledge of Hinduism, and readings on the internet and books. And as such, it is based on the analysis of a layman, so please excuse any errors. I would be grateful if you could inform me of them.)
Whenever righteousness wanes and unrighteousness increases I send myself forth.
For the protection of the good and for the destruction of evil,and for the establishment of righteousness,
I come into being age after age. (Gita:4.7–8)
Through his many avatars, and especially Rama and Krishna, Vishnu attracts great devotion and love in India. Mainstream Hinduism today tends to emphasize the devotional aspects of the Vishnu avatars and related aspects of Hindu and Buddhist philosophy. However, a political aspect of the major Vishnu avatars appears if one pays attention to not just who Vishnu appears as, but whom (s)he defeats and vanquishes.
Let us recap the major avatars of Vishnu (and the antagonists) in sequential order: Matsya, a fish avatar who saves Manu, the progenitor of man from the demon Damanaka; Kurma the turtle who churns the oceans for an immortality nectar; Varaha a boar that kills the demon Hiranyaksha. Next comes Mohini, the female avatar who kills the demon Bhasmasura; followed by the half-lion half-man Narasimha who defeats the demon Hiranyakashap and saves his son Prahlad. A major change in the nature of the Vishnu avatars and the antagonists occurs after this fifth avatar.
In his sixth avatar, Vishnu appears as a dwarf to remove the demon king Bali from the throne of heaven. In the seventh avatar, Vishnu appears as a human for the first time, as the Brahmin Parshurama who defeats the human king Kartavirya Arjun and his formidable army. The eighth avatar is Lord Rama, who is born a king, but abandons his throne for the forest and defeats the unbeatable warrior, great scholar, maestro of the Veena, ruler of a prosperous kingdom, the demon-king Ravana. The ninth avatar, Krishna, is raised in a cowherd’s family, and orchestrates the defeat of human Emperor Duryodhana, ‘the unconquerable one’ and ruler of the known world.
The latter avatars of Vishnu always appear to defeat kings. And with each avatar, the antagonist (who is always a king) becomes grander and more impressive. It is interesting to speculate on why this particularly sequence appears. Why is the evil or adharma always manifesting as a monarch ? And why is this monarch a stronger and seemingly more capable one with each avatar ?
The avatars of Vishnu appear in the various Puranas, whom historians typically date from the early centuries of the first millenium (100-200 CE). By this time, monarchy as a principle of authority was firmly established in India and the country had seen the first sequence of kingdoms and its first major empire (the Mauryan empire) had emerged, ruled and collapsed. The reemergence of empire (after the Mauryans) in India indicated that monarchy was here to stay, replacing the tribe and clan based Mahajanapada system that endured from 600 BCE to 300 BCE.
The Vishnu avatars defeat of increasingly powerful kings might thus be seen as a search by religious scholars for a new equilibrium in the societal balance of power. The deeds of the avatars and the reasons for their appearance can be seen as an attempt to institute a check against the kings power, which was otherwise becoming absolute. Thus, the religious scholars of ancient India can be seen as advocating some form of human rights, and seeking to constrain the unchecked coercive power of the king.
And looking from this viewpoint, one realizes that perhaps the main reason for the collapse of the great Indian empires was not the machinations of outsiders, but emperors who did not heed the message of the Vishnu avatars.