Introduction
Optional providers let you use a service only if it is available. This helps your app work even if some parts are missing.
You want to use a service only if it is registered in the app.
You build a module that can work with or without certain dependencies.
You want to avoid errors when a provider is not found.
You want to make your code more flexible and reusable.