So you're saying a Brahmin will let his daughter marry a Shudra doctor?!
If a Shudra becomes a doctor, he becomes a Brahmin.
Okay, let me explain the caste system. Majority of the people have no clue about it.
The caste system is no different from our modern professional classes that we have today. The only difference is the caste system forced you to aspire towards a better life, whereas today's modern society allows you to make a choice for yourself, so you can even choose to be a bum. Plus, your life choices are more flexible today.
Also a Shudra is not an untouchable according to the rules. But it became a practice during British rule after poverty was introduced for the first time in India, and public education came to an end.
In the past, you basically had only a few career choices. But it was compulsory for all to have an education. So everybody underwent education under a Brahmin, this included children of the lowest classes to princes. And they all lived life the same way, no different from a modern school today. So the different castes were all career choices. A Shudra's child could always opt to become a Brahmin. This was the Gurukul system, this system was also exported to China, and that's how they got the Shaolin and various other schools.
Then Hinduism went into a major decline and Buddhism came to power for 700 years. This system eventually got corrupt because education became big and quite competitive, like today. Education also became more complex. We started making great strides in education. For example, modern surgery was developed in India. We started setting up the world's first universities. Superiority complexes developed. A Brahmin always considered himself to be superior to the other castes, and education became rigid, no different from today. So a doctor could not train himself to also become an engineer simultaneously in this new corrupt system. All castes were eventually trained within their own fields. So now a blacksmith's son couldn't choose to become a soldier and so on. Eventually, the Shudras who only served the other three castes got no education.
Then Islamic rule came up and education declined.
After the British came to power, the Gurukul system died and the British used the caste system to subjugate India by making it worse. This is when the concept of untouchability was created. The British were literally going around the country sticking groups of people into the list of untouchables via census.
Basically, the caste system is very effective. But it was very idealistic and developed for a Utopian world, not for ours. Every single person in the world today is living in a bastardized version of the Hindu caste system without knowing it.