The batch loss could be noisy as some batches could yield a higher loss than the previous one (e.g. if the batch contains “hard” samples). However, since the training would generally decrease the overall loss, calculating the average would smooth the curve.