It is believed that this is some of the original stuff of which the solar system was made. This process of accretion was the first stage of the history of the moon. In the early history of the solar system accretion was quite rapid.
Accretion slowly continues today as asteroids and comets impact the planets of the solar system.
The origin of the moon is still debated but it seems the evidence is swinging toward the swiping collision with the earth. The currently held consensus is one where a mars sized object impacted with a still molten earth scattering pieces into orbit. These pieces reaccreted into the moon. This would have happened about 4.5 Billion Years ago. Instead let us speculate that early in the history of our solar system there was a crossing of juvenile solar systems.