Every single person I have met does this or at least used to do it. The legacy of this remarkably useless trick, unfortunately, could not be traced back to the genius who invented it, but it has been handed down since them from one generation of clueless Windows users to the next. Most new users learn this trick from other users without attempting to find out what it achieves. Some do it just because others do it. Some even have weird explanations for it.
Some people assumes that it refreshes the RAM, while some others believe that doing it will somehow keep their PCs running smooth and easy. I have seen users obsessed with refreshing the desktop, doing it every 30 seconds or so. They have even learnt the keyboard shortcut - F5 (just to mention, these are the people who never use keyboard shortcuts). They would press the key and hold it down for a long time, sending the desktop into a frenzy of refreshes.
What does a desktop refresh actually do? Refreshing the desktop simply redraws the icons on the desktop. That's it! It doesn't refreshes the RAM. It doesn't clean your PC. It doesn't refreshes your computer the way it refreshes you when you wake up from a nap. Refreshing the desktop has absolutely no effect on the performance of the computer.
So why is the tool there? As I said, refresh is used to re-display or redraw the icons on the desktop. Sometimes when you make changes to the desktop icons and the change doesn't get reflected instantly, you have to refresh the desktop. Say, you have the desktop icons set to arrange themselves alphabetically on your desktop. When you add a new item to the desktop, this item might not get arranged alphabetically and instead appear at the bottom of icon list on the desktop. When you refresh the desktop the newly added item would go to its proper position and all the icons would once more be sorted alphabetically. This is what refresh is for. It is to re-display the desktop. Refresh does the same thing when done inside Windows explorer.
So, if you are in the habit of refreshing the desktop, stop it. You are just wasting your time and effort. And the next time you see a person doing it, don't forget to explain to him the futility of this action.