to understand the essence of cast system one has to go back to the time when the society viewed the individual in accordance to the profession of oneself. unlike modern days where profession is the result of individual choice od career in earlier days it was always passed on from father to son. for example a farmers son will be a farment. a glodsmit will be a son of a goldsmith. it enabled the system to work efficently when a goldsmith to marry a bride from the family which does the same profession. coming to think about it- the professional mentality and the household functions wouldnt be distrupted this way. suppose a goldsmith goes and marry a bride from a farmer family. she to begun with being brought up from the farmet background wouldnt be able to cope up wiht the functions of a goldsmith lifestyle. so in pratical terms marrage through caste was an efficient way of the functioning of the system. But as we all know in todays terms - things are diffrent and this system wouldnt be pratical anyway. Sometimes during the british regime this caste system took an ugly avathar and it was used to supress certain class of the society by thouse who were in more comfortable position. There is no mention of caste in the religion. if one notices carefully - it is always mentioned if ever mentioned to notify the profession.
Today caste system is not an assert for hinduism. but unfortunately it tend to exist- I guess it is about time for the system to undergo a revamp and change in accordance to modern times.
PLEASE DO NOT TREAT CASTE SYSTEM AS A FEATURE OF HINDUISM. HINDUISM HAS MUCH MORE TO OFFER. INFACT IT IS THE ONLY RELIGION WHERE U DONT HAVE TO BE A HINDU TO UNDERSTAND AND ADAPT THE PRINCIPLES. YOU CAN BE A CHRISTIAN OR A MUSLIM AND YET FOLLOW HINDU PRINCIPLES. AND IT WILL BE APT TO TREAT HINDUISM AS A WAY OF LIFE RATHER THAN A RELIGION