This is not a coincidence at all, but a direct consequence of the way the solar system was formed.
The generally accepted model is that solar systems (including our own) form out of a Protoplanetary disc. Gravitation causes mass to collapse around a protostar, which always has some angular momentum (as does everything). Wikipedia explains it better than I can:
Protostars typically form from molecular clouds consisting primarily of molecular hydrogen. When a portion of a molecular cloud reaches a critical size, mass, or density, it begins to collapse under its own gravity. As this collapsing cloud, called a solar nebula, becomes denser, random gas motions originally present in the cloud average out in favor of the direction of the nebula's net angular momentum. Conservation of angular momentum causes the rotation to increase as the nebula radius decreases. This rotation causes the cloud to flatten out—much like forming a flat pizza out of dough—and take the form of a disk.
And then, from this protoplanetary disk, planets form. Consequently, they're all in the same plane.
As such, the inclinations of each planet's orbit are pretty close to that of Earth's:
Planet Orbital Inclination