When the net specified in LossFunction produces an array (not a scalar number), a SummationLayer[] is automatically added. So the total of the numbers in the output array is used as a loss.
Thanks for spotting, we will add a note in the documentation of LossFunction.