Why the ii-V-I progression works
A major-key ii-V-I progression moves from a minor seventh chord on scale degree 2, to a dominant seventh chord on scale degree 5, to a major seventh chord on scale degree 1.
In C major, that pattern is Dm7, G7, and Cmaj7. The roots move by descending fifths or ascending fourths, and the dominant G7 chord creates the pull back to Cmaj7.