One of the foremost figures in the pantheon of Gods and holy men of the Hindus is Maharishi Manu. He is supposed to be the law giver and enunciated a set of laws that divided Hindus society into castes. Manu left behind the Manusmriti or Law code , which is the most important and earliest metrical work of the Dharmaśāstra textual tradition of Hinduism
Manu basically propounded 4 castes namely the Brahmins, the Kshatriyas, Vaish and the Shudras. The caste classes had a hierarchy and the Brahmins were the highest caste with the Shudras at the bottom end of the social spectrum. The Shudras were also considered untouchables. This ethos had a great bearing on the military mien of the Hindus.
These social classes had distinct functions. The Brahmins were the teachers and the priests, while the Ksahtriyas were the warrior class and the last two Vaish and Shudras did the other tasks of society. Manu had decreed in his laws of Manu that only the Kshatriyas could be soldiers and bear arms. No other cast could handle weapons. In fact the Vaish and the Shudras were debarred by canonical law from bearing weapons or partaking in any form of military training on pain of death.
With a large part of the populace unable to bear arms, the Hindu Generals had their strategy cut out. They perforce planned a battle with only the available resources. Thus Hindu generals made a plan of battle with only one caste. This militated against military theory, but they believed this to be a divine law and accordingly enforced it to the hilt. The ancient Vedas, Puranas and Hindu epics like the Mahabharta and Ramayana all extoll the caste division of society and specifically mention that the warrior class was only the Kshatriyas.
The Kshatriyas were very brave, but they could not plan any second line of defense as the Shudras and vaish were forbidden to bear arms. Thus in a battle in case the Kshatriyas were defeated ,the Hindu armies just disintegrated and the kingdom was over run easily. This system of caste division continued for nearly 2500 years, till the Moslems defeated the Hindus and became the rulers from the 9th century AD.
The caste system thus was one of the main factors for the defeat of the Hindus. An example is the son of Mohammad Ghouri who after defeating the Kshatriayas was able to advance right up to Nadia in Bengal with just a 100 horsemen and no body opposed him. The reason was that Shudras and Vaish could do nothing as they were unarmed and untrained in battle and thus could only watch as the horsemen swept forward.