Rangabhumi episode in Mahabharat is often sighted as an example of how it was a casteist society and how Karna had to suffer because of his adoptive parents being Suta.
As per Vyasdev's Mahabharat this is how the events in Rangabhumi took place.
After completing their education under the guidance of Guru Drona, all the princes of Kuruvansha had gathered in the Rangabhumi to demonstrate their skills. They took turns in showing what they had learned and impressed the audience. Arjuna showed some really amazing feats outshining every other prince.
At this point, a warrior enters the Rangabhumi and demands that he also should be allowed to showcase his skill. Everyone present there is surprised because this was clearly not expected. Still, Drona allows the warrior to perform. This warrior matches all the extraordinary feats performed by Arjuna and does even better.
Duryodhan is very impressed seeing another warrior who could match Arjuna and is all praise for this warrior.
After impressing everyone by his feats, this warrior demands to have a duel with Arjuna. It is then Kripacharya who demands to know the identity and lineage of this warrior which for any logical person is a fair ask.
Karna who seemed to be not very proud of his lineage hesitated to answer this question.
Seeing his hesitation, Kripa pointed out that without knowing the identity of the challenger, a duel cannot be permitted, for a royal of Hastinapur can only be challenged by someone of similar stature.
Duryodhan crowned this warrior the king of Anga and gave this warrior a royal stature.
Nobody ridiculed Karna because of his caste, in fact there are many prominent Suta mentioned in Mahabharat with tremendous respect and with powerful positions. The question here was more about royalty versus commoner, which is why Duryodhan came up with the solution by crowning him King.
If it was a caste issue, crowning him King would not have addressed that.