What process explains why the orbital planes of most major planets lie close to the ecliptic plane?

Answer

The planets coalesced within a flattened protoplanetary disk.

The entire Solar System formed from a spinning cloud of gas and dust that flattened into a disk, causing the planets to coalesce within that shared, fundamental plane.

What process explains why the orbital planes of most major planets lie close to the ecliptic plane?
suncelestialpathsphereecliptic