Final answer:
The planets orbit the Sun in the same direction because the solar system formed out of a single spinning disk of gas and dust, conserving angular momentum as it collapsed under gravity.
Step-by-step explanation:
According to the nebular hypothesis, all planets orbit the Sun in the same direction because the solar system formed from a single spinning disk. This rotating disk was a cloud of gas and dust that began to collapse under its own gravity, and as it did so, it conserved angular momentum, which made it spin faster, much like a figure skater pulls their arms in to spin faster on the ice. As the cloud collapsed further, its rotation caused the material to form a disk where planets coalesced, all moving in the same direction as the original spin of the nebula.