India's famous caste system has been much looked down upon with frowns. It's not just Hinduism; Islam, Christianity and even Sikhism have their own, very unique lobbying-in-built based on castes. The other day, I had a discussion with one of my friends about caste system in various religions. I would keep scope of this passage limited to castes in Hinduism. It's been a moot-point in Kali-yuga only in the sense that everything (except Truth) is said to become devoid of vitality in the age of Kali. The Varnashrama system was to maintain balance in all activities in society in other ages. Satya-yuga, Dwapar, Treta and Kaliyuga are fractions of 1 Mahayuga in Bhagavata Purana terminology. Satya, Dwapar, Treata and Kaliyuga make 40, 30, 20 and 10 percent, respectively of one hundred percent of Mahayuga. To give a vague idea of Bhagvata Purana time-scale, I have put an image copied from Wikipedia article on Manvantara. The age of Manu or Manvantara is the life-span of Manu who is direct son of Bramha(Jesus-like albeit there is creator of Bramha as well.) In Satya, Dwapar and Treta Yuga, Sataguna used to be higher but in descending order in influence, respectively. The varnashrama was based on the innate nature(guna) and aptitudes of native, rather than by birth. Kings by birth are no kings if they don't have righteous gunas of king or if they lack aptitude of a king.
In Kaliyuga, there are very few if any who understand the importance of Varnashrama, though we do practice division of duties in our pursuits in business, family and other relations.
Caste-system in middle ages and afterwards has eaten up soul of India up to a great extent. An arrogant, tamoguni, egoistic Bramhin is not Bramhin if he is born into a Bramhin family; similarly a wise man possessing knowledge of Vedas, Puranas, Yajna, Yoga, Death, Moksha and Reincarnation, even if born into a Shudra family, must be considered Bramhin.