What is the purpose of using a differential amplifier? (Common-mode rejection ratio: CMRR)

Figure  Noise superimposed on the amplifier’s ground
Figure Noise superimposed on the amplifier’s ground

Differential amplifiers are used mainly to suppress noise.
Noise consists of typical differential noise and common-mode noise, of which the latter can easily be suppressed with an op-amp.
There are two main causes of common-mode noise:

  1. Noise is generated in the wires and cables, due to electromagnetic induction, etc., and it causes a difference in potential (i.e., noise) between the signal source ground and the circuit ground.
  2. Current flowing into the ground of a circuit from another circuit causes a ground potential rise (noise).

In either case, the ground potential, a reference for a circuit, fluctuates because of noise. It is difficult to remove common-mode noise with typical filters. Differential amplifiers are used as a means of suppressing common-mode noise.
The op-amp configures this differential amplifier as the main circuit. The symbol shown below represents a differential amplifier. It has two inputs: VIN(+) and VIN(-). The output voltage is equal to a difference in voltage between the two inputs multiplied by the amp’s gain (AV):
VOUT=AV{VIN(+) - VIN(-)}
Suppose that common-mode noise (vnoise) is superimposed on the differential inputs. Then,
VIN(+)‘=VIN(+) + Vnoise
VIN(-)‘=VIN(-) + Vnoise
Hence, the output is expressed as follows. This indicates that the differential amplifier
cancels out common-mode noise:
VOUT=AV[{VIN(+) + Vnoise} - {VIN(-) + Vnoise}]
=AV{VIN(+) - VIN(-)}

The common-mode rejection ratio (CMRR) is specified as one of the electrical characteristics of an op-amp.

Example of an electrical characteristics table in a datasheet
Example of an electrical characteristics table in a datasheet

Also see the application notes on op-amps:
Link to application notes