Here's why:
* Planetary nebulae are formed by dying stars. They are the colorful shells of gas ejected by a star as it runs out of fuel and sheds its outer layers.
* The planets of a star system are not ejected during this process. While the star sheds its outer layers, the planets continue to orbit the remaining core of the star.
* Planetary nebulae are short-lived phenomena. They only last for a few tens of thousands of years, which is a blink of an eye in astronomical terms. Any planets in the system will continue to orbit the core of the star long after the nebula has dissipated.
It's important to note: The name "planetary nebula" is a misnomer. It was coined by early astronomers who observed them through telescopes and noted their round, planet-like appearance. However, they are not related to planets in any way.