The races have been created by the gods. Most worlds have the creation of the races codified within the their religions. When comparing these creation myths, some doubt their truths because of inconsistencies within.
Most creation myths mention the fact that there are 5 primary gods who created themselves and the first 5 races. Then they all created a second race, creating 10 races in total. The first members of those second races where raised up to become the secondary gods of those 5 new races. At that point they in turn created 5 more races, bringing the total up to 15. the first members of those third races where raised up to become the tertiary gods of those 5 races.
At that point there is usually a struggle and attempt by the tertiary gods to create 5 more races which gets overruled by the primary and sometimes secondary gods, fearing for overpopulation and ever decreasing stability of the world.
Although this general structure of the creation myth seems to be convergence, whom among the races and gods turn out to be primary, secondary and tertiary varies from world to world. Sometimes details of the above structure are changed which might cause divergent events or even divergent worlds.