Protoplanetary disks form as a natural consequence of star formation. When a molecular cloud collapses under its own gravity, it forms a protostar surrounded by a disk of gas and dust. This material, initially part of the molecular cloud, flattens into a disk due to the conservation of angular momentum. Over time, this disk evolves and interacts with the central protostar, leading to the formation of planets.