The orbit of planets is guided by several factors, only one of which is the gravitational influence of the Sun, though that is, of course, the strongest. Humans ascribe an inordinate amount of weight, in orbits, to what they perceive as the existing, or static, motion. They assume the orbit is constant, having been in place since the inception of the Solar System. They assume the distance from the Sun is maintained by centrifugal force, pulling away from the Sun. They assume the rotation of planets is a constant, and having no explanation for rotation ascribe it also to motion having been in place since the inception of the Solar System. Humans view the result of many factors they do not understand, and ascribe this result to inappropriate causes. They are wrong on all counts, but as the Solar System does not change in its motion before their eyes, this is not often up for debate. Rigid minds have no reason to change. Comfortable theories have no uncomfortable challenges.
The orbiting planets are indeed caught in the Sun's gravitational field, but there is more than gravity and motion at play in maintaining the distance they do from the Sun. The orbits are scarcely fast enough to create a centrifugal force strong enough to keep them at a distance from the Sun. Planets do not drift into the Sun, in the main, due to a repulsion force generated in both bodies. Where the force of gravity is constant, and steadily pulls a smaller object toward a larger, a repulsion force is generated between objects, and only becomes strong enough when the mass of the two objects is sufficient. Do binary Sun's maintain their dance around each other, always at the same distance, by accident? Tiny objects, such as comets or meteors which regularly crash into the Sun or the orbiting planets, do not generate a repulsion force sufficient to counteract gravity, due to their tiny mass in proportion to the Sun or planet. When their paths bring them close, they are caught in the gravity pull.
Orbiting planets are in motion because they are attracted to more than the Sun's gravitational field, more than the Sun's dark twin which acts as the 12th Planet's second focus, and certainly more than each other, although that is a small factor. Do the stars maintain their distance from each other by accident? For those who doubt that there are gravitational influences outside of the Solar System, pulling on the orbiting planets, we would point to the elliptical path that planets assume. Why an ellipse? If the planets were concerned only with the Sun, or with each other, they would not assume the path they do. Planets assume an elliptical orbit for the same reason that comets leave the Solar System. They are listening to more than one voice. As to why this voice but not another calls to this planet but not another, the answer lies in the force of gravity, which is not at all as simple as humans assume. Gravity has many nuances, depending on composition and distance, and what influences one body toward another may have little effect on other bodies.
Why do repeating comets, which clearly set into an orbit around the Sun during a good portion of their time within the Solar System, escape? If one assumes that planets are not escaping because the circular or elliptical orbit is stable, then why not apply the same logic to comets? Humans do not apply this logic to comets because it doesn't compute, so deal with the contradiction by falling into magical explanations for the behavior of comets. The answer to this riddle is that neither orbit is stable, but that the comet, being tiny, can escape from the Sun's gravitational pull more easily than the larger planets, just as it can be caught in a collision course to the Sun or a planet, due to its tiny size. Even repeating comets, which are assumed to have only one focus, the Sun, are listening to more than one voice. They leave the Sun, having settled momentarily into an orbit around the Sun, and head toward the one or more other gravitational influence that dominates their life. Some comets orbit, briefly, these other foci, and some simply get drawn back toward the Sun. In this case they appear to humans to have a long ellipse orbit.
Elliptical orbits have no explanation if one is to consider that the Sun or other planets are the only gravitational influences. In particular, the elliptical orbit of a repeating comet cannot be explained, as when it leaves the Sun it is heading straight away, and has no curve or angular momentum that would bring it round to where it is seen reentering the Solar System. When out in space, slowing due to the gravitational pull of the Sun to its back, it drifts toward the other gravitational focus it is sensitive to. There are three voices the repeating comet is listening to at this point.
By the time its momentum stops, as stop it does, the comet is positioned such that it will return to the Solar System in what appears to humans to be an elliptical manner, and not return whence it came. The position of the apparent ellipse of a repeating comet's orbit is in fact caused by the position of the second or more gravitational foci of this comet.