It’s a side-effect of how the sitemap is generated by Yoast SEO (and I presume other sitemap plugins). They exit as soon as they send the sitemap to the browser which stops WordPress actions and filters from running. They don’t always set the current URL as a feed either.
For reasons long forgotten, but probably related to working around plugins that change the is_feed() settings WP-Super-Cache caches the status of the current page. It then uses that information to see if it should skip caching the page. That caching is fired on the “template_redirect” action, but since the sitemap plugin has exited that action won’t fire. Then later, the plugin checks if is_feed() is true (it should use the cached information, that’s an oversight) but since the sitemap plugin doesn’t set that either, it’s not.
As a result of is_feed() returning false, the plugin caches the sitemap as an anonymous html page which uses the text/html content type, not text/xml.