How are links rendered? In Drupal 8, what code determines if a link is output as text, or an anchor tag with text?

I have entered a route:&lt;nolink&gt; item in the menu, but the output is this:

&lt;span target="" data-highlight="0" data-icon="" title="Description of wris." data-drupal-link-system-path="&lt;front&gt;"&gt;wris&lt;/span&gt;


Instead, I want an anchor tag with just # for the href. 

Is there a reason why it only outputs a span? Where can I adjust this? Or, should I do this?
TL:DR; you need to overwrite the link_generator to change this behavior.
Drupal 8 uses the link generator for this. You can take a look at
Drupal\Core\Utility\LinkGenerator::generate if you want to know the code behind it all.
The key part is this:
elseif ($url-&gt;isRouted() &amp;&amp; $url-&gt;getRouteName() === '&lt;nolink&gt;') {
  $generated_link = new GeneratedNoLink();
  unset($attributes['href']);
}

If you take a look at GeneratedNoLink you will see
/**
 * This class holds a &lt;span&gt; generated from the &lt;nolink&gt; route.
 */
class GeneratedNoLink extends GeneratedLink {

  /**
   * {@inheritdoc}
   */
  const TAG = 'span';

}

So you need to implement your own no link class and not unset the href and everything should be fine. Doing so you more or less need to copy most of the logic in Drupal\Core\Utility\LinkGenerator::generate to determine when no link should be used.
Note
Links/urls can be generated in various ways, some use link_generator, some use url_generator, some use the link RenderElement. In your case it looks like  the link_generator is used, but that could be changed by custom theme/module.