The main goal of the GPL is to allow that programs can be understood and modified by user. A "trivial" javascript program accomplishes that, regardless of license.
The sample above is "non-trivial" according to the set of heuristics they are using, so they are just saying "if the program is not trivial, then you need to explicitly state that it is GPL for us to consider it free"