Welcome to the forum!
You will find many claiming that The Buddha did not oppose the caste system.
What these people completely forget is that The Buddha himself in Sutta Nipata says:
”I do not oppose desire…”
He did something way more powerful than opposing, which involves engagement/activity:
The Buddha rejected desire & the caste system and plenty of other things 100%.
- Rejecting is a way more powerful and wise approach than opposing.
Evil/Ignorance/Desire is like a muscle, by contending with it or opposing it you actually build it up and make it stronger.
On the other hand by rejecting it 100% it fades away and loses strength…
As to why The Buddha and Brahmā Sanaṅkumāra still said:
The aristocrat is best among people
by those who take clan as the standard.
But one accomplished in knowledge and conduct
is first among gods and humans.”
- There is no reason to take clan/caste as the standard since it is conduct / knowledge that distinguishes people.
But some still take caste as the standard:
“We’re both authorized masters of the three Vedas. I’m a student of Pokkharasādi, and he of Tārukkha.
We’re fully qualified in all the Vedic experts teach.” - MN 98
And only from this perspective of caste, by those who take clan as the standard, (which is only a mere convention in the world) the aristocrat is best among people:
”The brahmins proficient in the three Vedas sink down where they have sat, only to drift apart, while imagining they’re crossing over to drier ground. That’s why the three Vedas of the brahmins are called a ‘salted land’ and a ‘barren land’ and a ‘disaster’.”” - DN 13
I can’t find the sutta in question but basically The Buddha says in the sutta that it is not like all humans came together and decided that there is such a thing as caste, the brahmins in imagining superiority just enforced this view, without even asking others.
And now this from MN 98:
the differences between humans
are not defined by birth.
Not by hair nor by head,
not by ear nor by eye,
not by mouth nor by nose,
not by lips nor by eyebrow,
not by shoulder nor by neck,
not by belly nor by back,
not by buttocks nor by breast,
not by groin nor by genitals,
not by hands nor by feet,
not by fingers nor by nails,
not by knees nor by thighs,
not by color nor by voice:
none of these are defined by birth
as it is for other species.
In individual human bodies
you can’t find such distinctions.
The distinctions among humans
are spoken of by convention.
For name and clan are formulated
as mere convention in the world.
Produced by mutual agreement,
they’re formulated for each individual.