Magento 2 ignores XML schema location in the etc/adminhtml/system.xml documents and always uses the Magento/Config/etc/system_file.xsd schema instead

A module 's etc/adminhtml/system.xml files contains XML schema location, for example:

https://github.com/magento/magento2/blob/2335247d4ae2dc1e0728ee73022b0a244ccd7f4c/app/code/Magento/Catalog/etc/adminhtml/system.xml#L8

But the location is ignored and Magento 2 always uses the Magento/Config/etc/system_file.xsd schema:

https://github.com/magento/magento2/blob/2335247d4ae2dc1e0728ee73022b0a244ccd7f4c/app/code/Magento/Config/Model/Config/SchemaLocator.php#L35


https://github.com/magento/magento2/blob/2335247d4ae2dc1e0728ee73022b0a244ccd7f4c/app/code/Magento/Config/Model/Config/SchemaLocator.php#L53-L56


https://github.com/magento/magento2/blob/2335247d4ae2dc1e0728ee73022b0a244ccd7f4c/lib/internal/Magento/Framework/Config/Reader/Filesystem.php#L98-L99


https://github.com/magento/magento2/blob/2335247d4ae2dc1e0728ee73022b0a244ccd7f4c/lib/internal/Magento/Framework/Config/Reader/Filesystem.php#L178


https://github.com/magento/magento2/blob/2335247d4ae2dc1e0728ee73022b0a244ccd7f4c/lib/internal/Magento/Framework/Config/Dom.php#L105


https://github.com/magento/magento2/blob/2335247d4ae2dc1e0728ee73022b0a244ccd7f4c/lib/internal/Magento/Framework/Config/Dom.php#L366-L367


https://github.com/magento/magento2/issues/2372

See also \Magento\Framework\Config\Reader\Filesystem::_createConfigMerger() uses the «new» keyword instead of the Object Manager even after the Object Manager has already been initialized, so it breaks a dependency injection possibility

See also How does Magento 2 validate XML configuration files with XSD schema.