In order for a transmission line to minimize distortion of the signal, the impedance of every location on the transmission line should be uniform throughout its length.
When the signal path has impedance discontinuity, in other words an impedance mismatch, then a termination impedance with the equivalent amount of impedance is placed at the point of line discontinuity.