The direction of Earth's rotation comes from the conservation of angular momentum of the various particles of the cloud of dust, rock and gas from which Solar System was formed. This conservation of angular momentum of various spinning molecule leads to the spinning of every planet in the Solar system. Due to the absence of any considerable friction the planets have been spinning in the same directions from billions of years.