How does \Magento\ConfigurableProduct\Model\Product\Type\Configurable::getConfigurableAttributeCollection() work?

Context: How does \Magento\ConfigurableProduct\Helper\Product\Options\Loader::load() work?