Background
Special:GlobalContributions links to pages on external wikis. Since the pages may be in nonstandard namespaces that are not known to the local wiki, it is not always possible to display the namespace in the link text.
Technical background
The URLs point directly to a page ID, rather than being built from a namespace and page title, since the namespace may not be known.
There is a set of namespaces known to all wikis, defined in NamespaceInfo::CANONICAL_NAMES, which maps namespace IDs to namespace labels. If the namespace is one of these, then the label can be displayed in the link text. If it is not, then it cannot be displayed because the label is not known.
Solution
We could look up the namespaces at the external wikis using API calls. (We already look up the user's permissions using API calls, explained in T356294#10272663.)
Pro: This means all the namespaces can be displayed
Con: More API lookups are not good for page load time (though they could be cached), and wiki-specific namespaces may be rare so a lookup on every page load may not be worth it
As with the permissions (T380867), ideally we would not need API calls to look up the namespaces. However, they are not stored in the database, so it is not possible to look them up directly: T226667.