If I had to make a guess, I would say that it ended entirely by chance (coincidentally enough).
On a more serious note, there is no explanation, and core D&D tends to mostly ignore the fact that such an age ever existed in the first place. It is used as a plot device to explain the existence of evil, and due to the fact that a similar trilogy of Good plane books is unlikely (We might - just might - be lucky enough to get *one* book on good planes, perhaps.) I doubt we will ever learn how Good arose in the evil universe, let alone Law.
I think in 2e there was some story about a being from beyond time / space (in effect either from another multiverse or from the far realms) - a serpent-like creature that arrived and, for some unknown reason, split into thirds. Each then ended up in one of the ultimate lawful planes (the LN plane, becoming the first Primus, the LE plane, becoming the Serpent / Asmodius, and the LG plane, becoming whatever being supposedly is at the top of Mt Celestia). Supposedly this was how Law arrived, and considering that one third of it was Good, that could be argued as to the means by which the first Good arrived as well.
On the other hand, in a realm of pure chaos, I can easily see the occasional CG being appearing, so perhaps the CG planes existed before the LG ones, in which case that is a story all in and of itself. Perhaps it took the presence of a LG plane (mt celestia) to prepare the way for a purely good plane - or even a purely CG plane, lending the arrangement enough stability for it to settle into an actual plane instead of something semi-planar that was constantly forming and un-forming.
I may be wrong on some of the details here, as I am recalling them from readings done years ago, so you may want to speak with some others as well about this topic.