Why DI is useful

As we already mentioned, programming with interfaces permits us to have a loosely-coupled code, permitting us to swap implementation depending on the context, but also to implement the components in a parallel way.

Imagine you have a really big software where multiple teams implement its features in parallel, an effective way of working could be to define the interface, the contract, for each component beforehand, so that they can be worked by different teams at the same time, and each team can mock their collaborators while working at their own component.