Std: planets condensed from the same dusty plasma as the star(s) they orbit.
Why is the interplanetary medium from which the planets condensed mostly hydrogen, when the planets are mostly heavy elements?
Planets should rotate in the opposite direction, since stuff nearer to the orbital center orbits faster, and matter within a given range of orbital radii has a net angular momentum in the opposite direction.