Language Manager getCurrentLanguage returns default language instead
The method you've quoted is the default code for single language sites. For multilingual sites the default LanguageManager is replaced with ConfigurableLanguageManager and the method is overridden wtih this content:

ConfigurableLanguageManager::getCurrentLanguage:

public function getCurrentLanguage($type = LanguageInterface::TYPE_INTERFACE) {
  if (!isset($this-&gt;negotiatedLanguages[$type])) {

    // Ensure we have a valid value for this language type.
    $this-&gt;negotiatedLanguages[$type] = $this
      -&gt;getDefaultLanguage();
    if ($this-&gt;negotiator &amp;&amp; $this
      -&gt;isMultilingual()) {
      if (!$this-&gt;initializing) {
        $this-&gt;initializing = TRUE;
        $negotiation = $this-&gt;negotiator
          -&gt;initializeType($type);
        $this-&gt;negotiatedLanguages[$type] = reset($negotiation);
        $this-&gt;negotiatedMethods[$type] = key($negotiation);
        $this-&gt;initializing = FALSE;
      }
      elseif ($type == LanguageInterface::TYPE_INTERFACE) {
        return new Language([
          'id' =&gt; LanguageInterface::LANGCODE_SYSTEM,
        ]);
      }
    }
  }
  return $this-&gt;negotiatedLanguages[$type];
}


Then the result depends on the language negotiators you have configured in language detection, see comment from @Clive.