Because the UPX .EXE Compressor program works with the contents of executable files protections are implemented in it to prevent modification or infection of the program.

One of them is RunInIDE protection which tests at startup whether the program's executable file has been decompiled modified or infected.