How does \Magento\Framework\Module\ModuleList\Loader::load() work?

Context: How is the app/etc/config.php file generated by the \Magento\Setup\Model\Installer::createModulesConfig()?

Details: How does \Magento\Framework\Module\ModuleList\Loader::getModuleConfigs() work?

Details: How does \Magento\Framework\Module\ModuleList\Loader::sortBySequence() work?