Immutability enables TTD through foundational architectural patterns like event sourcing, where every state change is an immutable event, and persistent data structures, which preserve all versions of data, facilitating deterministic replay and historical analysis.