the gravity of the sun keeps them in their orbits just as the moon orbits the earth because of the pull of Earth's gravity the earth orbits the sun because of the pull of the sun's gravity