TITLE: Motivation for the nLab's definition of cohomology?
QUESTION [9 upvotes]: I am trying to penetrate the nLab article on cohomology. I don't know anything about higher category theory, but it seems like the real content here is topological. My question has two parts.
First, the nLab gives the following general definition of cohomology, with motivation here. For ordinary cohomology, I understand. We put in the Eilenberg-MacLane spaces $K(G,n)$ for $A$, and we recover cohomology using the standard fact that cohomology is a representable functor represented by the E-ML spaces. Further, we know that delooping one of these increases $n$ by $1$. Let's stick with this example for moment.
Philosophically, why is the the definition they give the right one? To me, cohomology means a functor from some category to (most commonly) the category of abelian groups, with the additional property of turning short exact sequences into long exact sequences in cohomology. In the topological category, we usually motivate this by talking about "measuring holes," and more generally we speak of measuring the failure of something to be exact or trivial. To me, the fact that cohomology is representable seems entirely coincidental (homology isn't, for example) and more like the end of the story than the beginning. Why should we take the representability and delooping concepts as our definition? Why are they more basic and central?
Second, I'm curious about how other cohomology theories fit into this. Let's take the examples of sheaf cohomology and group cohomology. I am wondering why it's conceptually important to know these fit into nLab's general schema.
For sheaf cohomology, the nLab links to a paper of Kenneth Brown. I no have idea what's going on in this paper, but it seems theorem 2 on page 247 is the result the nLab is interested in. Somehow, once we view this through the lens of higher category theory, sheaf cohomology is representable in the way ordinary cohomology is. However, I can't make heads or tails of the details. How exactly does Verdier's hypercovering result make sheaf cohomology satisfy nLab's definition? 
For group cohomology, the nLab says:

For instance group cohomology is nothing but the cohomology in $H=
 \infty \operatorname{Grpd}$ on objects $X=BG$ that are deloopings of
  groups.

Broadly speaking, why is this just the usual definition of group cohomology? Does one actually need infinity-categories to understand this correspondence? If so, where could I find a good exposition of this topic?
I should probably say what my background is, to avoid answers pitched at too high a level. I know what it is taught in good introductory graduate courses on algebraic topology and homological algebra and so on, but not much more. In particular, I am completely ignorant of higher categories.
Edit: In light of the answer I got below, perhaps the best thing to ask is, what are the best references to learn this stuff from?

REPLY [3 votes]: You can see a different approach to the border between homology and homotopy in our book Nonabelian Algebraic Topology: filtered spaces, crossed complexes, cubical homotopy groupoids (pdf available there) (EMS Tract vol 15, 2011). This starts with history and intuition.  One main intuition was to use cubes to describe higher order compositions, leading to "algebraic inverses to subdivision" in a way and with uses difficult to obtain by simplicial methods.  
The main work is in establishing the algebraic material to obtain higher order Seifert-van Kampen Theorems for some functors which give colimit theorems for certain higher homotopy invariants, and which lead to quite concrete and precise calculations. It can also be described as trying to make higher homotopy theory look more like that of the fundamental group, and so nonabelian (in this book nonabelian up to dimension 2). 
You can also download  some presentations from  my preprint page. 
I worked a bit in the mid 1960s on nonabelian cohomology in dimension 1 but was turned off it when I found that working with groupoids gave me stronger results;  these led us eventually  to strict cubical higher groupoids, defined on certain spaces with structure. The latter idea hardly occurs in the theory and applications of weak $\infty$-groupoids, but in the form of filtered spaces and of $n$-ads is part of traditional homotopy theory.  
See this recent stackexchange answer for some concrete applications in group theory, only indicated in the above book.