I asked a geologist this, once, although specifically only about precious metals like gold and silver. He said the natural churn of everything moving around the Earth tends to concentrate similar things together over time. For example a river bend separates more dense silt on one side and less sense silt on the other. This, but also on a grand scale throughout the whole Earth.
It's a start, but I still have questions.