The north-south motion (or south-north) itself doesn't produce a sun-synchronous orbit. It's actually the deviation from straight north-south, coupled with the primary's (the planet or other body the satellite is orbiting) oblateness, that allows sun-synchronous orbits.
The wikipedia article on nodal precession is a good general source on this topic.
If a planet is located far from any significant gravitating object (such as the sun) and isn't rotating, gravity makes it assume a spherical shape. Orbits around a spherically symmetric object are very simple: they don't change shape, they don't change orientation, etc. But no planets are exactly spherical, and a planet's deviation from sphericity can make for interesting evolution of orbits around it.
If a planet is rotating, centrifugal force makes the equator bulge. That situation can be viewed as a somewhat smaller spherical mass, with the bulge being "extra mass" (enough to make the planet's actual mass) centered around the rotating planet's equator. If an object is orbiting with an inclination of, say, 45°, when over the northern hemisphere, that extra mass gently pulls the satellite toward the south. Eventually it gets to the equator, where it "crosses a node". Nodes are the places where the orbit intersects the equatorial plane. The ascending node is where the satellite crosses from the southern to the northern hemisphere, and the descending node is the opposite. Because of that southerly pull while over the northern hemisphere, the satellite reaches the descending node a bit earlier, farther to the west, than it would have were the planet purely spherical. The plane of its orbit has rotated westward!
While over the southern hemisphere, the pull of the bulge is northward, making it arrive at the ascending node even earlier, so the orbit plane has rotated even farther, in the same direction. The bulge (and the torque on the satellite arising from it) causes precession of the orbit plane.
The equation that relates the rate of that precession to the planet's and orbit's characteristics is $$\omega_p = -\frac{3}{2} J_2\frac{R_p^2}{p^2}\omega \cos i$$ where $\omega_p$ is the precession rate in radians per second, $J_2$ is a parameter describing the gravity field's deviation from spherical resulting from the bulge, $R_p$ is the planet's average radius, $p$ is the orbit's "semi-latus rectum", a parameter related to the orbit's size and eccentricity, $\omega$ is the orbiting object's average angular velocity around the primary ($2\pi$ radians divided by the orbit period), and $i$ is the orbit's inclination. The Wikipedia article gives a slightly different version of this equation, but they are equivalent.
For a qualitative description of precession you don't need to pay attention to most of that equation. If the orbit's eccentricity and size remains fixed, then everything to the left of $\cos i$ is constant. With a positive $i$ ("prograde orbit"), the ascending node migrates westward (the "negative" direction), as in the qualitative example above.
But as Earth orbits around the sun, the direction from the center of Earth to the sun migrates eastward in a reference frame fixed to the stars (an "inertial" frame). To establish a sun-synchronous orbit, the inclination has to make $\cos i$ negative, reversing that westward precession direction. To make $\cos i$ negative, $i$ must be larger than 90° ($\frac{\pi}{2}$ radians), or retrograde—but only slightly.
If you plug all the parameter values into the equation and assume an object in low circular Earth orbit (circular LEO), $i$ winds up being somewhere around 97-98°, depending on the precise orbit altitude. This is only 7-8° away from straight north-south, so it is generally referred to as a polar orbit. But that 7-8° of retrograde component, the deviation from exactly polar, is critical for being sun-synchronous. Indeed, if the orbit is exactly polar, $i$ is 90° so $\cos i$ is zero, and no precession occurs.
For orbits at higher altitudes $\omega$ is smaller, so to maintain $\omega_p$ at the sun-synchronous value $\cos i$ must have a larger negative value. This means its orbit inclination must be farther from exactly polar.