Drag the amber handles (or focus one and use the arrow keys). Each square's side is that point's vertical miss; its area is the squared error. "Best fit" means smallest total area — that is all the phrase has ever meant.
The scoreboard
The wait, what?
A line through the middle of the cloud — flat, sensible-looking — hides enormous squares at the ends. The machine's line often looks wrong: pulled by the extremes, cutting through the crowd. It wins for one boring reason: when you add up every square, its total area is the smallest any line can achieve.
“Least squares” is not a taste or an aesthetic. It is the definition of best — and every model you will ever meet is fighting for exactly this kind of shrinking area, in more dimensions than you can draw. Same game, more directions.