All error correction and detection are designed with an acceptable probability of error in mind, which depends on the medium. For example, if you know cosmic rays might flip 1 in a million bits, and you want your system to have 1 error per trillion bits, then you need to send every bit twice to be able to detect a one-in-a-million error.