In earlier versions of Drupal you could just delete a module from the file system and clear caches and stuff would work. In Drupal 8 if you do this it becomes impossible to import configuration because we validate config before import.
Step to reproduce:
- Install a module
- Remove the module code
- Try doing in single config import
You won't be able to because it will produce an error saying:
Decide what to do when a module goes missing. One option could be add a message to the status report telling the user a module is missing and that they should put it back and uninstall it.