When you see mercurial behavior, that doesn’t mean it’s random. It could very well be ordered, harmonic movement. Often it’s only the key signature of an orbit that circles a center not your own.
From Decoding the Heavens, by Jo Marchant:
Unlike the Sun and the Moon, the planets don’t follow smooth paths across the sky. They change speed, stop and zigzag about, so much so that their name (from the Greek word planetes) means ‘wanderer’ or ‘vagabond’.
These erratic movements in the heavens upset the Greeks of classical times, because they liked to think of everything in the universe as perfect, and perfect motion was uniform motion in a circle. The structure of the universe reflected the nature of the gods, so there could be no question of any sort of deviation or irregularity. Reconciling the wandering motions of the planets with this idea of perfect circles became one of the most pressing philosophical problems of the day.
In the fourth century BC one of Plato’s students in Athens, called Eudoxus, came up with a system of concentric spheres. Those that carried the planets slid over others, all rotating in different directions, with the Earth in the middle. The effect was that each planet traced a sort of figure-of-eight curve. It was a cunning idea, but it didn’t match the actual movements of the planets very well.
Then in the third century BC a mathematician working in Alexandria called Apollonius developed a much better idea: epicycles. He imagined the planets looping the loop – in other words, travelling in a small circle at the same time as the centre of that circle moved around the Earth.
This explained why the planets appeared to speed up and slow down, and why sometimes it even looked as if they were going backwards.