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?