Why do we call unsetenv (LD_PRELOAD) in the LD_PRELOAD exploit?

Why LD_PRELOAD how to exploit, is displayed here https://touhidshaikh.com/blog/?p=827 in the .c file. The first statement is unsetenv (LD_PRELOAD). Is it a routine action that all shared libraries run? Or what? I tried to execute the exploit without unsetv, and the terminal did not "hang" and received ^ C ^ Z ^ D.