...technically it should throw an error...
No, it works entirely as described in the specification.
It works because standard JavaScript arrays aren't really arrays,* they're just objects backed by Array.prototype with a special length property and special handling for property names that are array indexes according to the specification. A property with any other name is just a normal object property, not an array entry.
Since arrays are objects, they can have non-array-entry properties, just like any other object.
FWIW, the definition of an array index is:
An integer index is a String-valued property key that is a canonical numeric String (see 7.1.16) and whose numeric value is either +0 or a positive integer ≤ 253-1. An array index is an integer index whose numeric value i is in the range +0 ≤ i < 232-1.
Note that typed arrays are true arrays; but they're also objects, and you can add non-array-entry properties to them, too.
* (that's a post on my anemic little blog)
Objectand so they do every thing that anObjectdoes.