What would happen if you remove the black (reference) electrode from the circuit? Since you are measuring the difference between the two electrodes. You can use circuit ground as reference so why even include the third electrode in the circuit?
The black and red go into a difference amplifier, while the ground lead is used to help pull electrical interference, particularly 60/50 Hz from main supply, off the body to decrease interference into the recording system. The ground can also can decrease stimulation artifact, so best to place the ground between stimulating and recording electrodes.
When the nervous system stimulates the muscle cells, those muscle cells undergo action potentials (their membrane charge flips from positive to negative repeatedly). It is those action potentials that the muscle cells are undergoing, as part of the signal for their contraction, that the EMG machine is picking up. It is that the charge of action potentials going quickly from negative to positive and back again and repeating as long as the cells are stimulated, that is what causes the EMG signals to go up and down symmetrically.