It's the spec, See the ecma-262/5.1/#sec-10.4.3
The following steps are performed when control enters the execution context for function code contained in function object F, a caller provided thisArg, and a caller provided argumentsList:
- If the function code is strict code, set the ThisBinding to thisArg.
- Else if thisArg is null or undefined, set the ThisBinding to the global object.
.......
So when in strict mode, this
will refer to undefined
, otherwise it will refer to the global object.