Ancient history says that it’s from Brahma's divine manifestation of four groups. Priests and teachers were cast from his mouth, rulers and warriors from his arms, merchants and traders from his thighs, and workers and peasants from his feet.
And now it’s from their ancestors, previous wealth, deeds and stuff.