There are many interfaces in the Magento 2 core that not configured as di.xml
preferences.
Examples are
\Magento\Checkout\Model\Cart\CartInterface
\Magento\Catalog\Model\Layer\FilterableAttributeListInterface
\Magento\Catalog\Model\Layer\ContextInterface
- ...
All of these interfaces have implementations, there just is no preference.
Because no preferences are configured for these interfaces they need to be explicitly supplied to the object manager when it is creating the object graph for integration tests.
I understand that in many cases there can be no preference that fits all cases, but just choosing one of the available implementations more or less randomly when writing the tests seem to work.
If possible, I would like to know the reasoning behind choosing not to configure a preference for an interface. It would be great if someone from the core team maybe could elaborate. Thanks!