because earth picked up mass by orbiting through an accretion disk rotating around the sun, the friction gave it its spin impulse , and the direction of the disk spin its orbital direction and plane, same as with all other planets in the system, except those who were catched by the sun after they formed, or got hit by larger celestial bodies. our orbital axis is tilted because we got hit by a small proto planet from which its remains the moon formed