The explanation is pretty easy. Humans have an extremely wide range that includes many different environments from Arctic to Rain Forest. Those who live in the tropics tend to evolve higher levels of melanin in the skin to protect from the tropical sun and more surface area per pound to help rid of excess heat. Those who lived in the Arctic, for example, developed robust bodies, short limbs, etc. to help reduce heat loss. The adaptations to the various habitats ensured that some traits were passed on even when interbreeding took place between the populations. The interbreeding ensured we would remain as a species and continued need to maintain certain features evolved for particular habitats ensured that people would look slightly different throughout the world.
Although theories that Europeans lost much of their melanin since they moved into the north may be true, it may also be true that changes in diet when agriculture became dominant 13 thousand years ago, resulted in the need to increase vitamin D since it was no longer adequately obtained in the diet.