How does this IF alignment procedure work?
Any real mixer is not perfect; in addition to the sum and difference signals, you'll also get significant amounts of the original RF and LO signals as well. The key is to look at the frequencies of all four output signals.

In normal operation, you feed in RF and LO, and you get RF, LO, RF+LO and RF-LO at the input of the IF amplifier. Only one of these will be anywhere near the passband of the amplifier, and the rest will be strongly attenuated. The goal of IF alignment is to maximize the gain of the amplifier at that frequency.

During alignment, you feed in IF and LO, and you get IF, LO, IF+LO and IF-LO out. Again, only one of these will be close to the amplifier's passband, and it can be used for alignment purposes. While it's theoretically possible to align the IF amplifier to one of those other signals, in practice, the limited tuning range of the transformers makes it extremely unlikely. And in any case, you can make sure that you aren't aligning on a spurious signal by verifying that the indication doesn't change if you vary the LO.

The fact that those other signals are present does not interfere with the alignment process itself. First of all, they're strongly attenuated relative to the IF signal. Second, you're generally looking at relative changes in level at the output anyway. A constant offset caused by those other signals does not affect this.