Here, there is a simple explanation why we have to square the differences. Basically, it’s because “we have to be fair” when comparing data statistics. One could think that we could use module operator, instead of squaring the differences. We could, but the results may not indicate always the same idea.
The “Population Standard Deviation”:
The “Sample Standard Deviation“: