why does the earth rotate?