A very good question!
The reason is essentially to do with tides. And a slightly over-simplified summary is: If the moon orbits more slowly than the rotation of the parent body (as our Moon does, 12 degrees per day while the Earth rotates about 360 degrees per day) then the moon will gradually orbit further and further away. If the moon orbits faster than the rotation of the parent body, then the moon will gradually orbit closer and closer and eventually crash.
If there were no tides, none of this would happen. If both bodies are perfectly rigid and perfectly spherical, they will orbit each other for ever, with no change.
Tides
The Earth is soft, and stretches in response to gravitational forces. By "the Earth" here, I mean mostly the oceans; but the rock also stretches (much less) in response to gravity.
Let us assume for a moment that the Earth is perfectly fluid, and that that fluid is also perfectly frictionless and has no inertia. In that case, there will be a "bulge" just beneath the Moon, caused by the fact that this position is closer to the Moon than the centre of the Earth is, and therefore is more strongly attracted by the Moon's gravity. Similarly there is a "bulge" on the side furthest away from the Moon, caused by the fact that this position is further from the Moon than the centre of the Earth is, and therefore is less strongly attracted to the Moon by the Moon's gravity. (From memory, the height of these bulges is about 50cm).
Thus as the Moon orbits a fluid, frictionless, inertia-free Earth, the Earth becomes slightly elliptical, and the "bulge" follows the sub-lunar point exactly. There is therefore no effect on the Moon's motion.
The Earth is not perfectly fluid. The motion of its component materials (especially water) is not frictionless. Real materials do have inertia. So the description I have just given is completely false.
In the real world, tides are higher than 50cm. This is because the water sloshes around - for a simple example, take a shallow tray, fill it with water, and try carrying it: the small irregularities in the way you walk become huge irregularities in the way the water moves, and you end up spilling most of the water.
In the real world, since the Earth is rotating more rapidly (360°/day) than the Moon is orbiting (12°/day), the bulge is being carried too far forward by the Earth's rotation. Omitting a lot of accurate detail, this means that the Moon "sees" beneath itself a slightly elliptical Earth with its bulge slightly ahead of the sub-lunar point. Thus the Moon is always being pulled slightly forwards in its orbit.
Pulling a satellite forwards in its orbit makes it orbit higher, and also makes its orbital period longer. Since action and reaction are equal and opposite, this is also pulling the Earth backwards in its rotation, which is why the days are gradually getting longer. Two interesting consequences: since the Moon moves further away, it gets smaller in the sky, and one day it will get small enough that there will be no more total eclipses of the Sun. Since the days are getting longer, one day the days will be $\frac 1 {365}$ of a year in length, and there will be no more 29 February.
Fast moons
When a moon orbits faster than its parent planet's day, exactly the opposite happens. The moon will be "seeing" beneath itself a slightly elliptical planet whose bulge is "too far behind" and pulls it backwards in its orbit. This makes the orbit lower, and makes its orbital period shorter. There is no end to this process and eventually the moon will fall low enough to be caught by the planet's atmosphere, and crash.
Summary
Because of tides, the orbits of moons and satellites tend to decay away from the "one orbit = one day" position. A moon that is outside that position will move further and further outside it. A moon that is inside that position will move further and further inside it.
How fast this process happens depends on the nature of the planet. If the planet were made of a perfectly rigid substance then the effect would not happen at all because it would not be changing shape because of the moon's gravity. If it were perfectly fluid and inertialess then the effect would not happen at all because the bulge could be kept exactly under the moon with no effort at all. The Earth is a good candidate for orbital decay because of its oceans. Saturn is a good candidate for orbital decay because it is mostly gas. Mars is not a good candidate because it is mostly rock which, although flexible, is not as flexible as water or gas.
Postscript: The Earth also orbits the Moon, and the overall effect has been that the Moon's day has got lengthened until it equals the time the Earth takes to orbit the Moon. The Sun also raises tides on the Earth (and the Earth on the Sun) and so, since the Sun rotates faster than once per year, the Earth is being pulled forward in its orbit, it is moving steadily away from the Sun, and the year is getting steadily longer.