The British thought that India suffered from the same casteism as Christianity (& Abrahamic religions) in other places, so they tried their best to retrofit Indian society into that model. But they could find no evidence of casteism, so they were forced to artificially make up many "castes" & grouped people based on occupation etc. The people who could not be fitted into any castes were called a tribes, which are now known as scheduled tribes & castes. Otherwise there should have been just 4 castes according to every tenet of Hinduism. Unfortunately, Indians & the GOI have formalized that artificiality & that is the genesis of the caste system. Caste system is nothing but an invention of the British. Caste itself is a Portuguese word, nothing that correlates to Indian / Hinduism.