Inside an ALU, every functional unit (adder, AND, OR, …) computes its answer all the time. The result multiplexer decides which one becomes the output Y.
It's an ordinary multiplexer whose data inputs are the units' outputs and whose select lines are the function select bits. In the course's 2-operation slice, a 2:1 MUX with select F0 gives:
Y =
So F0 = 0 passes the AND result and F0 = 1 passes the OR result.
With the 2-bit opcode F1F0 (AND, OR, ADD, SUB) there are three units to choose from. ADD and SUB both select the adder's sum, so the course's slice uses F1 alone for that case: Y = , where S is the adder's sum.
Why compute everything and then select? It's simple and fast: no unit has to wait to be told to start. The cost is wasted switching power, which real processors reduce in other ways.
The MUX output is the ALU's real result, so the N and Z status flags must be taken after it.