The caste system developed in India for the purpose of making certain people do certain things as well as making it easy to spot a commoner and/or a noble. In general, it was so the poor stayed poor and the rich stayed rich/elite and above commoners and peasants.