...or maybe just checked for malformed file headers...
Jpg file extension,GIF89a pseudo-header,MZ actual header and UPX sections afterwards...
It kind of reminded me of a "funny" poc I had read about a couple of years ago,
named by his author as the..."Triple Headed program"...
http://www.securityelf.org/magicbyte.html...what actually made me curious/skeptical,is...why they used the GIF89a header,
when at the same time,the files have the .jpg extension.
Were they say bored of reading the JPEG specs,
and found the GIF header easier/more comfortable to implement,or what else...
'cause I don't remember any win32 exploits related to gif rendering or so...
Maybe again the answer simply has to do with what you've already said...
that since most AV products more or less scan for malformed jpeg headers...
they simply thought,why not make use of gif header instead,
as it might have more chances of successfully invading AVs...