Why update weights and biases after training a Neural Network on whole set of training samples
You are right.  While you could backpropagate for all samples and then update the weights, you don't have to.  Alternatively, you can iterate through the samples and, for each sample, backpropagate for just that sample and then update the weights.

The latter turns out to be more effective (empirically).  It is called stochastic gradient descent.  Today, most neural networks are trained using stochastic gradient descent, because it reaches convergence faster than the alternative.  This makes neural networks faster to train.

Anyway, you could do it either way.  Both ways are valid.  The stochastic gradient descent approach seems to be faster in practice, but neither one is wrong.

Why did the book describe it this way?  That's a pedagogical choice.  The author might have considered it more natural or easier to explain this way.