It only appears to be "insane" if you are not used to working with dynamically-typed languages. PHP has been dynamically-typed from the very beginning, so you need to program defensively and check type at runtime (no assumptions are safe).
The type checking it does on regular javascipt is still beneficial in catching and preventing a lot of coercion mistakes or attempting to accessing things that are potentially undefined.