There are a lot of rocks in the asteroid belt of our solar system. One of the most current asteroid databases lists the orbital parameters of almost 370,000 asteroids. Most of these orbit at an average distance of about 2 AU to 3.5 AU. (An AU, or astronomical unit, is roughly the distance of the Earth from the Sun).
There is a reason why most asteroids are within that range. If an asteroid gets closer to the sun than about 2 AU, then it runs the risk of striking one of the inner planets, or passing close enough that it’s either flung back away from the sun or thrown into it. Mars has an average distance of about 1.5 AU, for example, so 2 AU is a goodly amount of leeway. Farther out than about 3.5 AU, and an asteroid risks being captured or flung by Jupiter. Jupiter has an orbital distance of about 5.2 AU, but it is so massive that its danger zone for asteroids is quite large.
Jupiter is so massive that even asteroids safely in the belt are driven by its influence. You can see this in the figure below, which plots the number of asteroids at a particular average distance. Rather than being spread evenly, there are gaps (such as the one at 2.5 AU) where there are few asteroids. The interesting thing is that an asteroid orbiting at 2.5 AU would round the sun three times for every one time Jupiter orbits the sun. In other words, the orbital periods of the asteroid and Jupiter would have a ratio of 3 to 1. Each of the other gaps has a similar ratio, of 5 to 2, 7 to 3 and so on.
A more detailed analysis of orbital dynamics shows that orbits with these ratios have a resonance with Jupiter, which means over time orbits at these distances are unstable. Asteroids get nudged a little closer or farther from the sun, leaving these particular distances relatively barren.
In the music of the spheres, Jupiter plays a loud tune, and even the asteroids rock to its song.
Alan Chamberlain, JPL/Caltech