Here's why:
* Gravity is a fundamental force of nature. Every object with mass has gravity.
* The strength of gravity depends on mass and distance. Planets have different masses, so their gravity will be different. For example, Jupiter is much more massive than Earth, so it has stronger gravity.
* We've observed the effects of gravity on other planets. We can see how objects move around other planets (like moons orbiting planets) and how spacecraft are affected by their gravity.
So, while the strength of gravity varies, all planets in our solar system exert a gravitational pull.