Because all the changes of the container size are made by the insert iterator, not the algorithm.
The algorithms may
- read elements,
- wirte elements (change the elements in the container),
- reorder elements (change the sequence of the elements in the container),
and the algorithms never
- add/remove elements (change the size of the container).