glColor3f(1.0,1.0,1.0);
glPushMatrix();
glTranslated(0,0,movez);
glutSolidSphere(14,40,40);
glPopMatrix();
glTranslated multiplies current matrix by a translation matrix.
Each rendering multiply previous matrix, which cause translation on translated matrix.
We can solve this issue by resetting current matrix with identity matrix.
glColor3f(1.0,1.0,1.0);
glPushMatrix();
glLoadIdentity();
glTranslated(0,0,movez);
glutSolidSphere(14,40,40);
glPopMatrix();