To get a bit more technical, “The Lick” is played over a minor 7th chord. It starts on the root note of that chord, walking up the minor scale, before jumping down to the 7th note (in this case C) and finally resolving on the D. And that resolution is really pleasing to the human ear.