Why In CW, your receiver produces an audio tone whose pitch equals the difference between the incoming carrier and your receiver's beat frequency oscillator. If your transmit frequency differs from the other station's, the two carriers heterodyne and produce a beat note; when you tune so that difference goes to zero, you are transmitting on exactly his frequency. Practically, you set your transmit tone to the same pitch you hear from the other station so you land right on his signal instead of a few hundred hertz off.
Watch out Operating split is the opposite idea, deliberately transmitting on a different frequency, and matching code speed or sending cleanly are separate operating courtesies with nothing to do with frequency.
Zero beat = zero difference in frequency. Same pitch in, same pitch out.