A provider is only injectable within the module that declares it unless it is explicitly listed in that module's exports. Trying to inject an unexported provider from another module throws a dependency resolution error at startup. This rule keeps modules honest — you can read a module's public API just by looking at its exports array.
Provides a clear public API — exports array is a module's contract with the outside world.
Prevents accidental coupling — internal helpers stay private and can be changed freely.
Startup-time enforcement — NestJS throws immediately if a dependency boundary is violated.
Improves testability — modules can be tested in isolation by mocking only their declared exports.