The doer of good becomes good. The doer of evil becomes evil. One becomes virtuous by virtuous action, bad by bad action. The Upanishads, by the way, are later religious texts that began as commentaries on the Vedas but later became sacred writings in their own right. This is a really great way to organize a social order from top to bottom. Everyone has a role, and because their role has a religious dimension, society stays in balance. But as a religion, Hinduism has a problem, at least if you want to start an empire.