This is not a coincidence at all, but a direct consequence of the way the solar system was formed.
The formation and evolution of the Solar System began 4.5 billion years ago with the gravitational collapse of a small part of a giant molecular cloud. Most of the collapsing mass collected in the center, forming the Sun, while the rest flattened into a protoplanetary disk out of which the planets, moons, asteroids, and other small Solar System bodies forme
Our solar system is thought to have arisen from an amorphous cloud of gas and dust in space. The original cloud was spinning and this spin caused it to flatten out into a disk shape. The sun and planets are believed to have formed out of this disk, which is why even today the planets still orbit in a single plane around our sun.
An orbital plane is the flat, disk-shaped space that connects the center of the object being orbited with the center of the orbiting objects. Because all planets in our solar system share a similar orbital plane, planets don’t run in to each other.
All the planets, asteroids, meteoroids, and comets in the solar system orbit the sun. This is called heliocentric orbit.
Almost all these bodies also travel in the same orbital plane, a thin disk surrounding the sun and extending to the edge of the solar system. The orbital plane usually prevents planets or other celestial bodies from bumping into each other.
Some comets orbit outside the orbital plane, perpendicular or at an angle to the rest of the solar system bodies.
Music: Epic Hybrid Trailer by Infraction [No Copyright Music] / We Will Win
ILLUSTRATION BY TIM GUNTHER, NATIONAL GEOGRAPHIC