Why this matters
Global mutable state can be modified from anywhere, which makes the program harder to understand, test, and maintain. It can introduce hidden dependencies between components and is prone to concurrency issues. Encapsulating state helps maintain invariants and makes code more modular.