TITLE: Classifying space as the geometric realization of the nerve of $G$ viewed as a small category
QUESTION [9 upvotes]: Let $C$ be a small category: we define its nerve  $(N(C)_k)_k$ as the following simplicial set: $N(C)_0=Ob(C)$ (the set of objects), $N(C)_1=Mor(C)$ (the set of all morphisms) and $N(C)_k$ to be a set of all $k$-tuples of compasable morhpisms $(f_1,...,f_k)$. This is equipped with the face maps $d_i$ defined by $d_i(f_1,...,f_k):=(f_1,...,f_{i-1},f_i \circ f_{i+1},f_{i+2},...,f_k)$ except of $d_0$ and $d_k$ which omit the first and the last morphism. Degeneracies act as follows $s_j(f_1,...,f_k):=(f_1,...,f_{j-1},id,f_j,...,f_k)$.   
When $G$ is a group then $G$ can be viewed as a small category with only one object and the set of morphisms being $G$ itself. Thus everything is composable and $N(G)_k=G^k$. 
One thus arrives at the well defined simplicial set. Therefore one can speak about its geometric realization $|N(G)|$: there are in fact two possible versions, the standard one, sometimes called ,,thin realization'' and another version, which is called ,,thick'' realization which is denoted by $\| N(G) \|$ and which is defined using only relations involving the face maps. See also this discussion. 
I was told that this geometric realization is in fact (possible version of) the classifying space $BG$. I wonder why it is true. This question is motivated by this discussion. Since my original motivation was the statement that the group cohomology coincides with the (singular for example) cohomology of the classifying space and with the help of the cited discussion I was able to understand why is it true directly (not invoking the fact that $BG$ is geometric realization of $N(G)$) I'm posting this question as another topic. So my question is:

Why the geometric realization of $N(G)$ is (homotopy equivalent to) $BG$?

Some ideas can be found in Hatcher's book ,,Algebraic Topology'' however, as I understood correctly, the face maps $d_i$ from this book would act rather as $(g_1,...,g_k) \mapsto (g_1,...,g_{i-1},g_{i+1},...,g_k)$ which is not the same as for $N(G)$.
EDIT: The classifying space is not unique up to homeomorphism, but it is unique up to homotopy: the definition which is most familiar for me is the abstrack definition as the quotient of contractible principial $G$-bundle $EG$. There is also specyfic construction due to Milnor using infinite join which is also familiar to me. 
EDIT 2: As I understood correctly the answer below: each element from $\mathcal{E}G_n$ being of the form $(g_0,g_1,...,g_n)$ may be presented in the form $(g_0',g_0'g_1',...,g_0'g_1'...g_n')$. Solving in $g_0',...,g_n'$ gives $g_0'=g_0,g_1'=g_0^{-1}g_1,...,g_n'=g_{n-1}^{-1}g_n$. Thus we obtain a bijective map $\alpha:\mathcal{E}G_n \to \mathcal{E}G_n$ given by $\alpha(g_0,...,g_n)=(g_0,g_0^{-1}g_1,...,g_{n-1}^{-1}g_n)$. Let $d_i,s_j$ be the face maps and degeneracies which you described (omitting $i$-th vertex and repeating) and $d_i',s_j'$ be faces and degeneracies as in the definition of the nerve of the category. Then $\alpha s_j=s_j' \alpha$ and $\alpha d_i=d_i' \alpha$ for all $j$ and for all $i$ except $i=0$ where we obtain the difference on the zeroth coordinate $(\alpha d_0)(g_0,...,g_n)=(g_1,...)$ and $(d'_0 \alpha)(g_0,...,g_n)=(g_0^{-1}g_1,...)$ (the remaining entries are the same). Therefore if we pass to the quotient we get an equality. This suggest that there is something correct in this procedure: however I'm little bit confused with the following: $\mathcal{E}G$ is a simplicial set. Its geometric realization is just topological space: the bar notation which you are using refers to $EG/G$ which is also topological space. However you described face and degeneracies maps for $EG/G$ which looks like the relevant maps for $NG$ but the former is just topological space while the latter is (abstract) simplicial set.

REPLY [7 votes]: You should ignore simplicial objects at first, and just consider groupoids. In the following, you can let $G$ be a topological group such that $e\hookrightarrow G$ is a closed cofibration. All groupoids will be by default internal to $\mathbf{Top}$, even if not stated.
Consider three groupoids: $G$ itself considered as a groupoid with only identity arrows; $\mathbf{E}G$ with objects $G$ and a unique arrow between any two objects (thus the arrows are $G\times G$ with projections as source and target); $\mathbf{B}G$ with one object and $G$ the automorphisms of that object.
There are functors $G \to \mathbf{E}G \to \mathbf{B}G$. The first is the identity on objects, the second sends the arrow $(g,h)$ to $gh^{-1}$. Both $G$ and $\mathbf{E}G$ are (strict) group objects in $\mathbf{Gpd}$, and there is a free action $G\times \mathbf{E}G \to \mathbf{E}G$ of $G$ on $\mathbf{E}G$ by right multiplication after inclusion. The quotient by this action is exactly $\mathbf{B}G$, by the given functor. This can be seen directly.
Further, $\mathbf{E}G$ is canonically equivalent to the trivial groupoid $\ast$, in the sense that $\mathbf{E}G \to \ast$ has a canonical section and $\mathbf{E}G \to \ast \to \mathbf{E}G$ is canonically isomorphic (by $\alpha$, say) to the identity. So you can view $\mathbf{E}G \to \mathbf{B}G$ as being a principal $G$-bundle object with contractible total space.
Now the nerve functor preserves products, so there is a free action of the constant simplicial object on $G$ on $N\mathbf{E}G$, and moreover the quotient by this action is exactly $N\mathbf{B}G$, by the simplicial map $N\mathbf{E}G \to N\mathbf{B}G$. The natural isomorphism $\alpha$ gives a simplicial homotopy $N\alpha$, so that $\mathbf{E}G$ is a contractible simplicial object. So we have a $G$-bundle in simplicial objects with contractible total space.
Now do geometric realisation (not the thick geometric realisation), which preserves products, so that you get a free $G$-action on $EG := |N\mathbf{E}G|$ whose quotient is $BG :=|N\mathbf{B}G|$. The simplicial homotopy gives a contracting homotopy for $EG$. Local triviality of $EG \to BG$ is a bit harder, but possible. The open cover over which one trivialises has a subordinate partition of unity, by construction.
So $BG$ constructed by the geometric realisation of the nerve of $\mathbf{B}G$ is the base of a (numerable, even) principal $G$-bundle with contractible total space.