In the Puranas of Vishnu, four societies are described, each of which exists in the four Ashramas: sixteen societies total. After the culture of India was conquered, people were segregated into these societies, and they were made to be hereditary castes; the ritual of Tarpana was similarly perverted into institutional functions which benefited the conquerors. However, though the Buddha Gotama has been criticized for teaching against castes, and against Tarpana, for the equalization of women, and in numerous other ways, these criticisms originated from the dominant castes, descendent from the conquerors: as an avatar of Vishnu, he was restoring a more literal interpretation of the Puranas - and advancing the practice: by demonstrating the means by which attachment to ritual, whether spiritual or vulgar, counterfeits the Dharma, he was able to illuminate an end to suffering.
The Puranas describe four societies. After Brahma discovered the world, Brahma became desirous of creating, of procreating, of interaction with the world just discovered. Being neither male nor female, such creation occurred in a different manner than coupling: from Brahma's mouth, breast, thighs and feet (the being has none of these parts, but the words are used to approximate their equivalency) arose four new beings, each partially aspecting Brahma. The Brahmans, Kshetriyas, Vaisyas, Sudras: beings of rightness, beings of wrongness, mysterious beings of both rightness and wrongness, even more mysterious beings of neither right nor wrong. Each being was sustained not by food as we know it, but by the act of devotion, which for them was loyalty to the nature of their being, nourished by rightness, wrongness, rightness and wrongness, or neither rightness nor wrongness.
People are nourished by devotion to their nature even today, and gravitate toward one or another type of society.
As the sun rises and sets in a day, and the night rises and sets in a night, there set an age of the world. In this growing darkness, the differences between the societies became blurred; though yet distinct, the difference between right and wrong had diminished. People learned pain - and pleasure. The heat and cold, the rain and wind, all the weather began to hurt them, and so they learned the construction of buildings so they might hide from the world. Though today there remain those who live outdoors, in a primitive state, most people today see less difference between right and wrong. In this new age of the world, people required greater food than devotion, and thus learned agriculture - and though there are still those people who eat little, and live in a primitive state, most people hunger for a full plate. Most people today seek refuge in areas sheltered by trees, mountains, water; fertile areas, areas with uncommon mineral resources. Humanity first learned to cultivate rice, barley, wheat, millet, sesame, panic, lentils, beans, and peas - and then learned new types of food.
However, since these were now the sustenance of people, and the people could still remember when they lived more primitively, without such things, they developed rituals of offering these foods in sacrifice to Brahma, as if to demonstrate that they would prefer the sustenance of Brahma, as in the previous age. They would offer entire buildings, devoted to the sacrifice, calling them Temples. As time passed, they forgot Brahma, and offered sacrifices to the sun - for the sun evaporated water from the sea and gave them rain to feed their crops; they understood the sacrifice as completing the cycle, as in the previous age their devotion completed a cycle of their own making. Ignorant as these people had became, it was the devotion which sustained them: the growing of the food good enough to be sacrificed required right work, and right action - and though they stumbled in the darkness, the people thus remained on the path of their ancestors. It was this sacrifice which was the perpetuation of their humanity, their nature.
For in the darkness, those beings who were inclined toward rightness embraced the ritual sacrifices, those inclined toward wrongness rejected the ritual sacrifices, those inclined both to right and wrong undertook the sacrifices with doubt, and those inclined neither to right nor wrong gave cause, action to the sacrifices - as the filth of manure gives cause and action required to raise wholesome foods through doubtful means, producing not only food but considerable plant matter to waste.
As a new day arose, a new age arose, the nature of humanity evolved. Those inclined toward rightness developed goodness; those inclined toward wrongness developed wickedness; those inclined both to right and wrong developed courage; those inclined neither toward right nor wrong developed a true humanity, and a nature independent of Brahma, maturing into a new being. As the day rose, Brahma observed, and then declared the Dharma of people, understanding that duty had evolved.
Brahma noticed, too, that all the other beings of the universe had similarly grown. These other beings took interest in the affairs of each other, and inclined toward shared nature, took society with each other. The dead ghosts found society with the good Brahmans, the devas found society with the brave Kshetriyas, the spirits of the world found society with the Sudras, and so forth. And in society, these beings together assumed control over regions of the world, every loka knew mastery for the first time. And their duties in these lokas guided them into systematic organization, cooperation, and co-dependence. From the deepest reaches of Hell to the highest reaches of Heaven, every being was observed by Brahma, who declared the Dharma observed.