Exposing internal collections breaks encapsulation and allows external modification.
If internal collections like a list of orders are exposed directly, external code can alter the collection, potentially violating class invariants or causing inconsistent states. By providing access through methods that return copies or unmodifiable views, you maintain control over how the collections are accessed and modified.
Additional Notes
Why should internal collections not be exposed directly?