Why is the covariant derivative of the metric tensor zero? I've consulted several books for the explanation of why 
$$\nabla _{\mu}g_{\alpha \beta} = 0,$$
and hence derive the relation between metric tensor and affine connection $\Gamma ^{\sigma}_{\mu \beta} $
$$\Gamma ^{\gamma} _{\beta \mu} = \frac{1}{2} g^{\alpha \gamma}(\partial _{\mu}g_{\alpha \beta} + \partial _{\beta} g_{\alpha \mu} - \partial _{\alpha}g_{\beta \mu}).$$
But I'm getting nowhere. May be I've to go through the concepts of manifold much deeper.   
 A: It can be show easily by the next reasoning.
$$
DA_{i} = g_{ik}DA^{k},
$$
because $DA_{i}$ is a vector (according to the definition of covariant derivative).
On the other hand,
$$
DA_{i} = D(g_{ik}A^{k}) = g_{ik}DA^{k} + A^{k}Dg_{ik}.
$$
So,
$$
g_{ik}DA^{k} + A^{k}Dg_{ik} = g_{ik}DA^{k} \Rightarrow Dg_{ik} = 0.
$$
So, it isn't a condition, it is a consequence of covariance derivative and metric tensor definition.
The relation between Christoffel's symbols and metric tensor derivations can be earned by cyclic permutation of indexes in the covariance derivative $g_{ik; l}$ expression, which is equal to zero.
A: The connection is chosen so that the covariant derivative of the metric is zero.  The vanishing covariant metric derivative is not a consequence of using "any" connection, it's a condition that allows us to choose a specific connection $\Gamma^{\sigma}_{\mu \beta}$.  You could in principle have connections for which $\nabla_{\mu}g_{\alpha \beta}$ did not vanish.  But we specifically want a connection for which this condition is true because we want a parallel transport operation which preserves angles and lengths.
A: Here is another straight forward calculation, but assuming the existence of locally flat coordinates $\xi^i\left(x^\mu\right)$. Then
\begin{align}
D_\rho g_{\mu \nu} &= \partial_\rho g_{\mu \nu} - g_{\mu \sigma} \Gamma_{\nu\rho}^{\sigma} - g_{\sigma\nu} \Gamma_{\mu\rho}^{\sigma} \\
&= \partial_\rho \left( \frac{\partial \xi^i}{\partial x^\mu}\frac{\partial \xi^i}{\partial x^\nu} \right) - g_{\mu \sigma} \frac{\partial x^\sigma}{\partial \xi^i} \frac{\partial^2 \xi^i}{\partial x^\nu \partial x^\rho} - g_{\sigma \nu} \frac{\partial x^\sigma}{\partial \xi^i} \frac{\partial^2 \xi^i}{\partial x^\mu \partial x^\rho} \\
&= \frac{\partial^2 \xi^i}{\partial x^\rho \partial x^\mu}\frac{\partial \xi^i}{\partial x^\nu} + \frac{\partial \xi^i}{\partial x^\mu}\frac{\partial^2 \xi^i}{\partial x^\rho \partial x^\nu} - \frac{\partial \xi^j}{\partial x^\mu}\underbrace{\frac{\partial \xi^j}{\partial x^\sigma} \frac{\partial x^\sigma}{\partial \xi^i}}_{\delta^j_i} \frac{\partial^2 \xi^i}{\partial x^\nu \partial x^\rho} - \frac{\partial \xi^j}{\partial x^\sigma}\frac{\partial \xi^j}{\partial x^\nu}\frac{\partial x^\sigma}{\partial \xi^i} \frac{\partial^2 \xi^i}{\partial x^\mu \partial x^\rho} \\
&= 0
\end{align}
A: This is only meant to supplement the first answer.
If we think physically, then we live in one particular (pseudo-)Riemannian world.  In this world, there is only one metric tensor (up to scalar) and it can pretty much be measured.  If I found it here, and if an alien measured it, and we compared our answers, they would be scalar multiples of each other (choice of Parisian metre stick for me, choice of Imperial foot for the alien, or, vice versa..).  There is precisely one connection, and it can be calculated from the metric.  
So I quarrel with the word used by @twistor59, «chosen».  There is no choice.  Given a metric, the connection is determined.  I agree with the rest of the answer, but would
like to see the word «chosen» replaced by «given».  I would rather say,
given a metric, the connection is determined by the metric.
A: Consider the analogy with Newtonian gravity. In Newtonian gravity, we have a potential $\Phi$, and differentiating that gives the gravitational field.
In GR, the metric plays the role of the potential, and by differentiating it we get the Christoffel coefficients, which can be interpreted as measures of the gravitational field.
Now in GR we have the equivalence principle (e.p.), and one way of stating the e.p. is that we can always choose a local frame of reference such that the gravitational field is zero. Therefore coordinates exist such that $\nabla_\alpha g_{\mu\nu}=0$. But $g$ is a tensor, and the whole point of the covariant derivative $\nabla$ is that it's a tensor (unlike the partial derivatives with respect to the coordinates). And a tensor that's zero in one set of coordinates is zero in all other coordinates. Therefore we must have $\nabla_\alpha g_{\mu\nu}=0$ in whatever set of coordinates we choose.
