Ah, that's the spot: Why scratching brings relief
Why can't all our research money to go such enlightening things.
Basically scratching blocks unpleasant memories and feelings.
Just think, when I'm remembering how I got picking my nose, I can just scratch and all will be forgotten. When I get snubbed by Barak Obama, I can just scratch and those feelings go away until Obama can explain that it wasn't a snub at all.
You can read more here