When you say
let 5 = 10
it's not a redefinition of 5, it's a pattern matching, the same which occurs when you say
foo 5 = undefined
... foo 10 ...
The pattern simply fails if it's ever matched.
In let-expressions the match is lazy. This means the match is only being done when a variable bound by it is evaluated. This allows us to write things like
let foo = undefined in 10
In your expression, no variable is bound, so the pattern is never matched.
Arguably such patterns with no variables make no sense in let-bindings and should be detected by the compiler, but the language doesn't forbid them.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…