Currently reading Indian Philosophy Vol I, Radhakrishnan
On the origin of classes and caste during the Vedic Age:
The system of caste is, in reality, neither Aryan nor Dravidian, but was introduced to meet the needs of the time when the different racial types had to live together in amity. It was then the salvation of the country, whatever its present tendency may be. The only way of conserving the culture of a race which ran the great risk of being absorbed by the superstitions of the large numbers of native inhabitants was to pin down rigidly by iron bonds the existing differences of culture and race. Unfortunately, this device to prevent the social organisation from decay and death ultimately prevented it even from growing. The barriers did not show any signs of weakening when the tide of progress demanded it. While they contributed to the preservation of the social order they did not help the advancement of the nation as a whole. But this gives us no right to condemn the institution of caste as it was originally introduced. Only caste made it possible for a number of races to live together side by side without fighting each other. India solved peacefully the inter-racial problem which other people did by a decree of death. When European races conquered others, they took care to efface their human dignity and annihilate their self-respect. Caste enabled the Vedic Indian to preserve the integrity and independence of the conquering as well as the conquered races and promote mutual confidence and harmony.