Rubble piles form when an asteroid or moon (which may originally be monolithic) is smashed to pieces by an impact, and the shattered pieces subsequently fall back together, primarily due to self-gravitation. This coalescing usually takes from several hours to weeks.