Minimising sum of squared residuals
The target of 'small residuals' needs to be objectively defined. Least squares does this.
Each residual is 'squared' with a blue square on this diagram. The sum of squared residuals is the total area of these squares. Drag the line to make the total blue area as small as possible. Click Least squares to minimise the area.
The third example (from the pop-up menu) has 5 values on a straight line and a single outlier. The least squares line is pulled down by the outlier.