Why does the Earth Rotate?

The Earth rotates because the matter that it was made of was rotating when the earth was made. The pull of the sun’s gravity and the the gravity of Jupiter causes a wobble in the spin.