Suppose we are measuring the heights of different people. Our measures will be in $cm$, but the variance will be in $cm^2$. If we were measuring the time to complete a race course, our measures would be in $seconds$ , but the variance would be $seconds^2$
What do those units mean? Why are they there?
I'm not asking about the formula, that much I can understand, but I'm asking for the underlying meaning of it.
We calculate the variance by finding the squared differences between each data point and the mean. Squaring these differences ensures they are all positive.
The squaring of variance is used to ensure that there are not canceling issues while using signed values that have direction. For example, someone a few centimeters taller and another a few centimeters shorter than the average might have their deviations cancel to zero. Squaring ensures all deviations contribute as positive values, preventing this cancellation and providing a more accurate picture of the spread.
Squaring the units also gives more weight to larger deviations. Since squares are always non-negative, larger deviations from the mean contribute more significantly to the overall variance.