Why adding unneeded libraries to invocation are linked anyway?

-linkall can be used both when linking (to make sure that the modules/libraries on the command line are all linked) and when building a module or library (to indicate that any reference to the module must link it, usually because the module has side-effects that must be performed).
compilerlibs.common falls into the second category: a bunch of the typing modules use forward references, meaning that some modules only work correctly if the module later in the dependency graph are linked too. So they are compiled with -linkall, because we don’t have a good way to encode the precise constraints.