I'm sorry to say what I'm just about to say... specially sorry to David Schomer, because it is his book that was the first book on barista techniques that I read, and he does so very good writing about coffee and stories from his childhood...
This practice that you describe is recommended in the book 'Espresso coffee: Proffessional Techniques. Updated', written by beforementioned David Schomer. (*) Author claims
this practice makes shot taste sweeter. it helps to keep portafilter temperature more constant. This practice is one of the mysti pizza stuff written in the book, this is how I call it. In other words, this is ... you know what. Find it in the meadow.

(*) to those who are likely going to think it is impossible... well, it's page 57.
about this sweeter shots, I don't remember where exactly it was (could be I read it on forums)
But, of course, the version of the practice you were told is not flawlessly passed: you should wipe the portafilter from the remains of the old puck.