Implied, but so far not stated specifically, is that the output tubes of an amplifier need to see a high load of several thousand ohms (the exact value depends on the tube and amp design.) If you run an output tube straight into a speaker, whether 4 or 8 ohms, it looks like a dead short to the tube -- not good.
And, straight from the tube, one is talking an output of up to hundreds of volts. Also not good for the speaker, which wants a lower voltage, but more amperage.
Hence, the transformer's job is to "translate" the output signal from the tubes so that the tube sees the proper impedance for its high voltage, lower amperage output, and the speaker receives a lower voltage with higher amperage.
Regarding which output tap to use -- usually either 4 or 8 ohms on modern tube amps (units from decades ago also often had a 16 ohm tap), keep in mind that very few, if any, speakers have a flat impedance value across the spectrum. Usually the value varies quite a bit from low bass to the highs. That's why the speaker impedance value is typically referred to as "nominal" which is an average of the lowest values the speaker presents. Using either the 4 or 8 ohm tap still puts one in the needed ballpark, so there is no risk of damage to either the amp or speaker regardless of which one is used. I believe the general recommendation among most knowledgeable people is to try both taps and use the one that sounds best to you.