> How is this related to the British? Caste is not their invention.
Technically, it is. This happens when people who do not understand a particular society or its conflict hierarchy start writing the laws for that society.
From Wikipedia:
> Modern India's caste system is based on the artificial modern superimposition of an old four-fold theoretical classification called the Varna on the natural social groupings called the Jāti. Varna conceptualised a society as consisting of four types of varnas, or categories: Brahmin, Kshatriya, Vaishya and Shudra, according to the nature of the work of its members. Varna was not an inherited category and the occupation determined the varna. However, a person's Jati is determined at birth and makes them take up that Jati's occupation; members could and did change their occupation based on personal strengths as well as economic, social and political factors. A 2016 study based on the DNA analysis of unrelated Indians determined that endogamous Jatis originated during the Gupta Empire.
> From 1901 onwards, for the purposes of the Decennial Census, the British colonial authorities arbitrarily and incorrectly forced all Jātis into the four Varna categories as described in ancient texts. Herbert Hope Risley, the Census Commissioner, noted that "The principle suggested as a basis was that of classification by social precedence as recognized by native public opinion at the present day, and manifesting itself in the facts that particular castes are supposed to be the modern representatives of one or other of the castes of the theoretical Indian system."
[1] https://en.wikipedia.org/wiki/Caste#In_South_Asia