Technically, it is not a surprise. If it instead of 13 you had c, whatever c is:
var b = c
[a, b].forEach(console.debug)
The compiler can interpret c as an object, and thus it can be indexed, and the a, b is the comma operator, so you dismiss a, and get b value as index.
But the grammar does not know the difference between 13 and c, both are an expression, and expressions can be indexed. In fact, almost every expression in JS is an object, and thus it can be indexed.
But of course... that is what machines do, not humans.