There are two-related concepts that we to understand: "quantum error-correction" and "fault-tolerant quantum computing".
Consider the scenario where Alice wants to sends some quantum state to Bob via a noisy quantum channel. To ensure that Bob gets the correct state with high probability, Alice and Bob mutually agree upon a quantum error-correcting code, Alice sends the state encoded with this code, and Bob decodes it. Now, further assume that Alice and Bob's computing apparatus is error-free. Then, Alice's encoding and Bob's decoding will be correct.
The above scenario is the model underlying quantum error-correction. In the example, you shared, this is exactly what is happening. We assume that error can only happen between time 1 and 2 (the noisy channel), and between time 2 and 4 there are no errors (Bob's decoding).
As you correctly pointed out, this is an unrealistic assumption, but a good way to start learning. The quantum error-correction model is a good model for communication scenarios, where the communication line have error rate $p_c$ and Alice and Bob have error rate $p_{ab} \ll p_c$.
A realistic model for computation is the model of fault-tolerant quantum computation. In this model, there is quantum circuit in which errors can occur on any qubit at any point in time. We are required to do logical computation using this noisy circuit, knowing full well that any encoding and decoding procedures will be implemented within this circuit and will also subject to errors.
As it turns out, it is possible to work around this problem of noisy encoding and decoding. Any such protocols are called fault-tolerant quantum computing protocol. The essential result in this area is as follows. Suppose you want to implement some logical quantum circuit, and you have access to a computer some some level of noise. Then, you can construct a larger circuit, using quantum error-correction codes, called a fault-tolerant circuit that if executed on the noisy quantum computer will yield the correct output with high probability.
Fault-tolerance is a vast field. There a section in Neilson and Chuang on it that discusses the key ideas. Another great resource is a book by Frank Gaitan called Quantum Error Correction and Fault Tolerant Quantum Computing.