When I first saw this programming pattern I found very difficult to understand why would people want to make their code so confusing. When I finally understood why this is used I knew I had to write about it someday. Today is that day.
Self executing functions are useful because using them you avoid creating global variables that could interfere with other parts of your code.
To understand this better I will give three examples of how you pollute and avoid the pollution of the global space.