Bhagavad Gita, Chapter 4, Verse 13
The fourfold caste was created by Me, by the differentiation of Guna and Karma. Though I am the author thereof, know Me to be the non-doer, and changeless.
The system was built around real differences in people, not around rank or birth.
This describes a structure meant to match genuine temperament and aptitude, not a hierarchy imposed from outside. And even having designed it, Krishna describes himself as untouched by it, the framework exists for people's benefit, not his.