The caste system is prevalent in India from the vedic times. Caste system was developed to divide work between different groups of people so that social harmony could be maintained. The castes turned into rigid barriers with the passage of time.
The caste rules are rigid because of the following reasons:
1) Concentration of power: The caste system was divided into different groups. At the top were the Brahmins followed by the Kshatriyas then the Vaishyas and finally, the Shudras. To maintain their power over the society, the Brahmins devised a set of rules that were to be followed. These rules were orthodox in nature, which created a division between the existing social groups.
2) Stereotypes and prejudice: The belief that was created by the Brahmins about the segregation between people still remains deeply entrenched in peoples' minds. People do not want to break free of this outlook and want to stick with the old thoughts. Also, since some people are still not challenging this belief, the caste rules still exist.
3) Source of identity: The segregation of the society into different castes and rules led people to create an association with a particular group. People, specially those belonging to the higher strata are happy staying in the confines of their groups and unwilling to break out of it.