The idea of an Indian caste system, as an unchanging, oppressive, and hereditary social hierarchy that is religiously mandated by and for Hindus, is the product of European conceptions about Indians and Hinduism.
Informed by 18th- and 19th- century beliefs in white-European and Christian superiority over “dark” races around the world and non-Christian religions, Europeans theorized that the whole of Indian society was organized as a four-fold caste system and a class of “untouchable” castes outside the main four. According to such theories, the system was created and enforced by a small and ostensibly oppressive Hindu priestly class of the false religions of India with seemingly little to no opposition from the masses for millenia. It remains the predominant way in which Indian and Hindu society are understood and portrayed globally, in spite of Europeans, over 200 years ago, witnessing ground realities that did not correspond to their conceptions.
Acknowledging the historical role of the British in conceiving an Indian caste system in no way denies that prejudices, discrimination, or exploitation on the basis of various perceived differences in different quarters and levels of Indian society existed (and continues to exist) and that some groups or communities have suffered more horribly than others. It also does not deny the reality of individuals and groups using social, political, and economic advantages, even the color of religion, to justify their standing and behavior towards others. But the fact is that the legacy of colonialism very much informs not only the understanding of India to date, but also impacts contemporary caste and religious dynamics in the subcontinent.
Indian society is no different than any other society around the world in that individuals hold and act upon factors other than the inherent worth of others. Without understanding the actual root causes of such perceptions, however, there can be little hope of resolving prejudice and discrimination and alleviating the harm and suffering that comes as a result.
The following is not intended to offer a thorough investigation of how the idea of a pan-Indian caste system came into being, but is an introduction. It is a vast topic and an area of established, active, and needed academic scholarship that entails decoloniality and its challenge to orientalism, modernism, and the privileging of Western over indigenous knowledge systems.