The container store dependencies. The container is used to resolve dependencies, those says which concrete implementation to substitute. You have a relationship can be an interface - class interface implementation, a class that inherits from a class, just class. So when you check you map type and its specific implementation.
//The ViewModel Constructor
void RegisterViewModel(IRegisterService service)
So when the ioc container you request RegisterViewModel, he looks at the constructor parameters and in accordance with the types it was creates and inserts to the constructor of the appropriate types. Why is it necessary, you can change the implementation or to make some of the implementations and register them depending on the startup options or registry keys. In General, the inversion of dependencies is to rid the code of connectedness. In the example above, VM is not used in a particular class and a type described by the interface if you need to change the implementation, you change only the place of realization, and the class VM will remain unchanged. On smaller projects, maybe not a noticeable benefit, but in large, over which few people, even very.