TITLE: Why is the cohomology of a $K(G,1)$ group cohomology?
QUESTION [22 upvotes]: Let $G$ be a (finite?) group. By definition, the Eilenberg-MacLane space $K(G,1)$ is a CW complex such that $\pi_1(K(G,1)) = G$ while the higher homotopy groups are zero. One can consider the singular cohomology of $K(G,1)$, and it is a theorem that this is isomorphic to the group cohomologies $H^*(G, \mathbb{Z})$. According to one of my teachers, this can be proved by an explicit construction of $K(G, 1)$. 
On the other hand, it seems like there ought to be a categorical argument. $K(G, 1)$ is the object that represents the functor $X \to H^1(X, \mathbb{Z})$ in the category of pointed CW complexes, say, while the group cohomology consists of the universal $\delta$-functor that begins with $M \to M^G$ for $M$ a $G$-module. In particular, I would be interested in a deeper explanation of this "coincidence" that singular cohomology on this universal object happens to equal group cohomology.
Is there one?

REPLY [6 votes]: Recall that group cohomology is not just about the trivial module, but is something you can compute for all $G$-modules. The corresponding thing on the topological side is to consider local systems on $K(G, 1)$ and their cohomology; in fact the category of local systems on $K(G, 1)$ is equivalent to the category of $G$-modules. Moreover, just as group cohomology is about taking derived invariants, cohomology of local systems is about taking derived global sections, and happily taking global sections of a local system is the same thing as taking invariants of the corresponding $G$-module. So there's reason to believe that the derived functors also match.
Now, as written this argument can't possibly work, because as it turns out the category of local systems on any reasonable path-connected space $X$ is equivalent to the category of $\pi_1(X)$-modules, but the cohomology of local systems on $X$ is sensitive to the higher homotopy of $X$ while the group cohomology of $\pi_1(X)$ is not. The difference in the case of general $X$ is that the resolutions needed to compute cohomology of local systems won't themselves be made of local systems; in the standard story these resolutions can be computed in the category of sheaves, but there's a much more interesting place to compute these resolutions, namely the (higher) category of derived local systems.
Roughly speaking, a derived local system on a space $X$ is an $\infty$-functor from the fundamental $\infty$-groupoid $\Pi_{\infty}(X)$ to, say, chain complexes. Unlike a local system, a derived local system is sensitive to the higher homotopy of $X$. Taking the derived global sections of such a thing (by which I mean taking the derived pushforward to a point, by which I mean some homotopy Kan extension) generalizes taking the cohomology of local systems, and in particular ordinary local systems on $X$ should possess resolutions in this category (in a suitable sense) allowing you to compute their cohomologies. If $X$ is a $K(G, 1)$ then this is just the category of chain complexes of $G$-modules and the familiar story from homological algebra takes over. (This generalizes the fact that to compute the cohomology of local systems on a $K(G, 1)$ it suffices to write down resolutions which are chain complexes of $G$-modules and it's unnecessary to consider more general sheaves.)