Well, so this is an LLVM thing as opposed to a a Julia thing, but the key phrase is “undefined behavior”… in the event of undefined behavior, the compiler is free to do absolutely anything it wants – say, exit the program, delete your boot volume, whatever – it’s just being nice by not doing that and instead just choosing a convenient nearby value. As Wikipedia puts it:
In the C community, undefined behavior may be humorously referred to as " nasal demons ", after a comp.std.cpost that explained undefined behavior as allowing the compiler to do anything it chooses, even “to make demons fly out of your nose”.[1]