Why square the result of $x_1 - \bar{x}$ in the standard deviation? I don't understand the necessity of square the result of  $x_1 - \bar{x}$ in  $$\sqrt{\frac{\sum_{i=1}^{N} (x_i - \bar{x})^2}{N-1}}$$. In fact I don't understand even why is $N - 1$ on the denominator instead of just $N$. Someone could explain it or recommend a good text about it? All books about Errors Theory or even Statistics that I found are either too much abstract or too much simplist.
Thanks in advance.

Squaring the Deviations
The variance of a sample measures the spread of the values in a sample or distribution. We could do this with any function of $|x_k-\bar{x}|$. The reason that we use $(x_k-\bar{x})^2$ is because the variance computed this way has very nice properties. Here are a couple:
$1$. The variance of the sum of independent variables is the sum of their variances.
Since $x_i$ and $y_j$ are independent, their probabilities multiply. Therefore,
$$
\begin{align}
\hspace{-1cm}\mathrm{Var}(X+Y)
&=\sum_{i=1}^n\sum_{j=1}^m\Big[(x_i+y_j)-(\bar{x}+\bar{y})\Big]^2p_iq_j\\
&=\sum_{k=1}^n(x_i-\bar{x})^2p_i+\sum_{j=1}^m(y_j-\bar{y})^2q_j+2\sum_{i=1}^n(x_i-\bar{x})p_i\sum_{j=1}^m(y_j-\bar{y})q_j\\
&=\sum_{k=1}^n(x_i-\bar{x})^2p_i+\sum_{j=1}^m(y_j-\bar{y})^2q_j\\
&=\mathrm{Var}(X)+\mathrm{Var}(Y)\tag{1}
\end{align}
$$
$2$. The mean is the point from which the mean square variance is minimized:
$$
\begin{align}
\sum_{i=1}^n(x_i-a)^2p_i
&=\sum_{i=1}^n(x_i^2-2ax_i+a^2)p_i\\
&=\sum_{i=1}^n\left(x_i^2-2\bar{x}x_i+\bar{x}^2+(\bar{x}-a)(2x_i-\bar{x}-a)\right)p_i\\
&=\left(\sum_{i=1}^n(x_i-\bar{x})^2p_i\right)+(\bar{x}-a)^2\tag{2}
\end{align}
$$
Dividing by $\mathbf{n-1}$
Considering $(2)$, it can be seen that the mean square of a sample measured from the mean of the sample will be smaller than the mean square of the sample measured from the mean of the distribution. In this answer, this idea is quantified to show that
$$
\mathrm{E}[v_s]=\frac{n{-}1}{n}v_d\tag{3}
$$
where $\mathrm{E}[v_s]$ is the expected value of the sample variance and $v_d$ is the distribution variance. $(3)$ explains why we estimate the distribution variance as
$$
v_d=\frac1{n-1}\sum_{i=1}^n(x_i-\bar{x})^2\tag{4}
$$
where $\bar{x}$ is the sample mean.
