The purpose is to match the characteristic impedance of the twisted pairs that carry the differential signals.
By matching the impedance, reflections from the termination can be minimized, which helps with signal integrity. This is elementary transmission line theory.
120 ohms is about the characteristic differential impedance of a typical twisted pair. For example, nominally two AWG 38 wires with PTFE insulation twisted together will be around 115 ohms.
If you use wires with a much different characteristic impedance, you can modify the terminating resistors to get better results. For example, if you chose to use CAT6 cable, 100 ohms might be more appropriate.
In many cases we're happy to be within 10 or 15% of the nominal.
If you want get intuitive, you can think of a lossless transmission line as sort of the sum of a large number of series inductances with parallel capacitances .
simulate this circuit – Schematic created using CircuitLab
if you had a very long twisted pair (say a few light-seconds long) and put a ohmmeter at one end you would measure about 120 ohms, briefly, as the wave traveled down the pair at perhaps 0.6 or 0.7 of the speed of light. Notice there is not a single resistor. There is initially no voltage across the (say it is open) far end, because of the speed of light. When the wave hits the end the voltage I * 120 appears across the end, but there is nowhere for the current to go so a reflected wave begins back toward the ohmmeter. Eventually it will settle down to show open-circuit (if the far end is open), or short if the far end is shorted. If you terminate the far end with 120 ohms, the reflection does not occur and you see a constant 120 ohms, intially and forever.
In practice the wave nature becomes important as the dimensions start to approach a wavelength of the highest frequency involved. If you have say a 1MHz square wave, if you consider components up to 11MHz the wavelength on a twisted pair would be around 17m, so for lengths above about 1/20 (1/10 for round trip) of that, or about 1m, it starts to be become significant. Those are just rough rules of thumb, others may have slightly different rules. Even a few inches of traces on a PCB can lead to significant ringing for a relatively low frequency (say 25MHz) square wave.
It's not unusual for precision position encoders to work up to MHz and beyond.
Anyway, if you want to learn about it, there is plenty of information available on the internet, Wiki and course notes. Or buy this paperback from a used dealer, and work the 165 solved problems and you'll be up to a solid 2nd or 3rd year undergraduate Engineer's level in understanding.