Here's why:
* Inertia: Planets are constantly moving forward due to their inertia, the tendency of an object to resist changes in its motion.
* Gravity: The Sun's gravity pulls on the planets, constantly trying to pull them inward.
* Balance: The combination of these two forces – inertia and gravity – creates a delicate balance. The planets' forward motion (inertia) keeps them from falling into the Sun, while the Sun's gravity pulls them in enough to prevent them from flying off into space.
This balance results in an elliptical orbit, where the planets travel in a slightly oval-shaped path around the Sun.
So, while gravity doesn't "keep" the planets in orbit, it's the crucial force that, combined with inertia, *creates* and maintains their orbital paths.