I wouldn't say that it goes beyond what the Swift compiler does. LLDB relies on binary Swift modules for its expression evaluator, which is LLDB's embedded Swift compiler. The expression evaluator is used for LLDB's expr command, or the p command with a non-trivial expression. Anything related to inspecting variables is done through a combination of reflection metadata and debug info.
In order to evaluate an expression LLDB wraps the expression in a function (often in an extension) that mimics the environment of the code at the active breakpoint. LLDB initializes a Swift compiler invocation that matches the compiler invocation used to compile that source file, and it will import that source file's own module (and its dependencies) to make all types visible at the active breakpoint available to the expression.
That is why the source file's own module used for debugging needs to have type declarations for all private types. Otherwise we couldn't compile expressions that use private types.
We have a long-term goal to serialize all Swift types to debug info and build a debug info -> AST importer, mostly so we can break the version lock between compiler and debugger. But neither the producer nor the consumer side of this has been implemented for full Swift, so for the time being the binary Swift modules registered with -debug-module-path ( Module Tracking in Swift Debug Info | Swift.org ) need to contain all private declarations, too.