Why don't the orbits of moons decay? How does a moon arrive at the perfect distance for maintaining an orbit indefinitely?I would argue that the orbits of most moons are NOT stable, most change with time and usually not with quiet results.
There is actually a very narrow range of conditions that must be met for an orbit to be established, all based on the relative masses of the two bodies, the speed of the potential moon and the locale of other massive bodies.
Getting all of this to play nice to the point where an orbit is actually achieved for any length of time is hard. Most orbits are unstable, with the most common scenarios being objects orbiting for a while then either spinning off into space - or the smaller body spiraling into the larger one.
The orbits we observe with our telescopes are the result of a selection bias. We see the successful ones. not the ones that failed, which occurred many more times.
The orbits of small things around bigger things is usually the domain of Newtonian dynamics. These are the principles developed by Isaac Newton to describe the motions of falling bodies, things in motion and all sorts of fun things.
Most of this work was based on people before him: Johannes Kepler, Tycho Brahe and Galileo (among others) all of whom contributed to our understand of all the things we see whirling around our heads.
Getting to your question, the orbits of moons do decay all the time. In fact, our moon's orbit - while it may seem stable - isn't. At least not completely.
Our moon is receding away from us at a rate of about 3.8 centimeters per year, a rate that was determined with the help of reflectors placed on the Moon by the Apollo astronauts.
The fact that the Moon is getting farther away doesn't exactly classify its orbit as unstable, rather it's just not staying the same for all time, which is what I would call a stable orbit.
So why is the Moon receding? There are lots of influences on the Moon as it travels around the Earth, most notably the tidal forces sloshing the oceans of the Earth up and down. All of that water going up and down on our planet, makes the Earth want to surge ahead, past the moon. This results in a little gravitational tug on the Moon, pulling it, like a rubber band.
This has the effect of pushing the Moon away from us.
The frictional effects of the Sun's gravity and solar wind along and other planets in our Solar System all play a role in how stable the Moon's orbit is.
Hopefully you can see by now that the Moon isn't going to maintain its orbit indefinitely. It will gradually fade farther from the Earth until it takes 47 days to orbit the Earth (as opposed to the 28 days it takes now).
As the solar system ages and the Sun gets older, things get even more interesting. In around five billion years, when the Moon is taking almost twice as long to orbit the Earth as it does now, the Sun will begin to die by expanding into a Red Giant.
When this happens, the drag created by the outer layers of the Sun will slow the Moon down, causing it to fall back to us. As the region near the Earth starts to boil with the approaching Sun, the Moon will continue to fall until it reaches something caused the Roche Limit.
At the Roche Limit, the tidal forces pulling on the Moon become greater than the gravity holding it together.
And the Moon explodes over our heads, at an altitude of 23,000 miles. After this explosion, all that will be left of our Moon will be a ring of debris over the Earth's equator.
Of course, by that time, we'll have more to worry about that the Moon blowing up over our heads.
Keep Looking Up!