Why do we need external and internal reference simultaneously in lock in amplifier?
When a lock-in amplifier is used for demodulation, the form of the internal reference used is important.

If the internal reference is a square wave, the PSD will be sensitive to the input and its harmonics. A sine reference is needed to be sensitive to only the fundamental signal itself.

The internal reference may be a two-phase sine and cosine, so that it can detect arbitrary phase angles.

Using an internal reference for the detection allows the external reference to be any signal of the correct frequency, square, pulse, sine, triangle, without the user having to provide the correct amplitude and waveshape as well.

With a single PSD lock-in, varying the phase of the signal would result in a sine-wave variation of output.