Every time some operations have to be repeated, a loop may come in handy. Loops are good for:
Doing something for every element of an object; Doing something until the processed data runs out; Doing something for every file in a folder; Doing something that can fail, until it succeeds; Iterating a calculation until it reaches convergence.