Its got to do with un-biasedness and degrees of freedom. Basically something is unbiased when E[theta_hat] = theta where theta_hat is the estimator for theta and theta is the population parameter.
In general, the theory is that if you estimate some quantity that depends on other estimated quantities, then you need to adjust your degrees of freedom. In this case, the variance/standard deviation depends on the mean so you account for 1 degree of freedom by using n - 1 instead of n in the denominator.
Take a look here:
Variance - Wikipedia, the free encyclopedia