I'm not sure what you mean by 'keping the sanitizing check'?
A C program is basically a bunch of bytes, and the C standard tells you what those bytes are supposed to mean. A compiler's job is to translate the bytes into whatever target language you fancy, and making sure to preserve the proscribed behaviour. And that's exactly what the compiler did.
Just blindly accepting user input is universally bad methinks.