I understood this was a consequence of solar system formation. During the formation of the sun, it goes through contractions and explosions, which blast material out into the broader gravity well (heavy elements are of course themselves the products of solar fusion). Light elements can be blasted quite a distance while the heavier elements slow down sooner (as they are climbing the solar gravity well).
Heavy elements also have more mass, and thus more gravitational attraction, than the lighter elements. The heavy elements become the kernels of the developing planets, and then attract light elements once some gravitational bulk had been built up.