It is necessary in order to distinguish 2 different reasons for referencing the compiled-in locale.
1. Some code just needs to pass the locale value on to logic that actually uses it.
2. Other code uses the locale value to select locale-specific user-visible data and behavior.
Code modified by this change is of the first kind and should use `goog.getLocale()` in the future.
Note: there are still references to the `goog.LOCALE` in Angular codebase, but they are of second type.
PR Close#43089
Prior to this commit, default value for LOCALE_ID was not setup for Closure Compiler. In Closure Compiler, we can use `goog.LOCALE` as a default value, which will be replaced at build time with current locale.
PR Close#31519
This is needed as:
- closure declares globals itself for minified names, which sometimes clobber our `ng` global
- we can't declare a closure extern as the namespace `ng` is already used within Google for typings for angularJS (via `goog.provide('ng....')`).