I think I can motivate the definitions of simplicial, singular, de Rham, Čech, and sheaf (co)homology, more or less.
I might want to understand bordism, and start by trying to understand submanifolds, then realize that this is really hard to do and try instead to handle a combinatorial approximation. Then I might define simplicial homology.
After dealing with simplicial homology for a few decades, I might tire of my confinement to the simplicial setting, but might nonetheless want to reason combinatorially about simplices, and I might then define the singular simplices functor and worry about singular homology.
Motivated by Stokes’s theorem and Poincaré duality, I might have the idea that Grassmann’s differential forms could be considered as dual to smooth submanifolds in some sense, and I might define de Rham cohomology on manifolds.
Once I knew about the Mayer–Vietoris sequence and had started to get a feeling for of local–global relations in (co)homology theories, and in particular knew Poincaré’s lemma, I might decide it was a good idea to try and understand (co)homology in terms of the combinatorics of a cover of contractible open sets, and I might eventually just define cohomology as the direct limit of a set of algebraic structures derived from covers. This would also have benefit of smoothing out irregularities in my object space.
Thinking about the properties of the de Rham complex in terms of supports of differential forms and still keeping the Poincaré lemma in mind, I might also define fine sheaves and ultimately cohomology with coefficients in a sheaf, if, for example, I were exceptionally creative and trying very hard not to look like an analyst while imprisoned by the Nazis in a POW camp.
On the other hand, I’ve looked at Dieudonné’s history and the original papers of Alexander and Spanier, but I still have no real idea what would inspire me to define
Alexander–Spanier cohomology. Does anyone have any insight?P.S. [7 Dec.]: Massey has an account in his essay “A history of cohomology theory” in the collection History of Topology (ed. Ioan James). On p. 567, he states
It is not difficult to see why Whitney and the other participants at the Moscow conference must have been mystified when Kolmogoroff and Alexander wrote down their definitions of a product of cochains. These definitions were pure ad hoc formulas, presented with no motivation. It is hard to guess how Alexander and Kolmogoroff arrived at them. It must have seemed like numerology or magic.
I’ve learned from Massey’s account that Alexander(–Kolmogorov!)–Spanier cohomology was likely intended to be dual to Vietoris homology but not exactly how this duality functioned. Vietoris homology was initially defined, as I understand, on compact metric spaces, with simplices ordered sets of points within an ϵneighborhood, and ϵ taken to zero, with cycles being sequences of cycles modulo eventual boundaries. While this approach to zero is reminiscent of modding out functions vanishing on a neighborhood of the diagonal, I still do not know their motivation for doing so.
Answer
I’m not an expert, the following is all just guesswork — I similarly found the original papers unenlightening wrt their motivation.
As you said, the mystery mainly lies in the motivation of the additional step: modding out the functions from Xk+1→R by the subcomplex of functions which disappear on the neighborhood of the diagonal.
First, let’s justify looking at neighborhoods of a space. We know from Alexander duality the philosophy of looking at tautness of a subspace U with respect to a space Y.
We look at neighborhood N of U in Y (by neighborhood, we mean a subset N of Y that contains U in its interior). The intersection of two neighborhoods of U in Y will be another neighborhood of U in Y, so this gives us a system of groups {Hq(N)} where N ranges over all neighborhoods of U in Y.
For each N, this gives us an inclusion U∈N, which induces a homomorphism Hq(N)→Hq(U). The subspace U is said to be “tautly embedded” in Y if this is an isomorphism for all q, all N, and all coefficient groups. Being taut implies that U is compact and Y is Hausdorff.
This gives us a hint: we are probably modding out by this subcomplex in order to deal with NON compact Hausdorff spaces.
Second, let’s justify looking at the diagonal. The diagonal embedding XΔ→X×X, is simply a canonical way to embed a space X into an ambient space endowed with the product topology, ΔX:={(x,x)∈X×X}. It is useful when want to look in the neighborhood of a space X (e.g., at germs of functions on X), but X sits in no ambient space. The word, “diagonal embedding,” comes from the example of embedding of R1↪R2 taking x↦(x,x), that is, taking the line R1 and embedding it into R2 as the line y=x.
With this in mind, let’s return our gaze to AlexanderSpanier cochains.
Here’s my naive guess: modding out functions which disappear on any neighborhood of X, N(X), artifically forces X to satisfy the condition that Hq(functions which disappear on N(X))≃Hq(functions which disappear on X) for all N, all q, and all coefficient groups. Perhaps modding out by the subcomplex lets us “falsely” satisfy that X is tautly embedded in X×X, so that we may treat X as if it were a compact space.
Below are a few additional comments toward why someone might have thought of modding out by that particular subcomplex.
Establishing notation: Xp+1 is the (p+1)fold product of X with itself, that is, for xi∈X, (x1,...,xp+1)∈Xp+1.
fp(X):={ functions Xp+1→Z}, with functional addition as the group operation.
fp0(X):= elements of fp(X) which are zero in the neighborhood of the diagonal ΔXp+1

If we are examining functions defined pointwise on X, it’s natural to look at Xembedded in an ambient space, rather than the space X itself. That is, N(X) is the natural home of the jet bundle of X.

Functions which disappear on N(X) form a group. If f and f′ are both zero on N(X) then f−f′ is zero on N(X).

I’m not sure if the following is useful, nor how it fits into the story, but I figured I’d mention it.
The natural home of jet bundles (over a space X) is over the diagonal of X. From reading this paper, it seems that Grothendieck brought to the fore the kth neighborhood of the diagonal of a manifold X when he was porting notions of differential geometry into algebraic geometry (this was then ported back into differential geometry by Spencer, Kumpera, and Malgrange). We’ll use the standard notation ΔX⊆X(k)⊆X×X. The only points of X(k) are the diagonal points (x,x), but, we equip our space X(k) with a structure sheaf of functions, and treat X(k) as if it is made of “kneighbor points” (x,y) where x and y are the closest points to one another, what Weil called “points proches”).
To picture X(1), we might imagine X with an infinitesimal normal bundle, for X(2), an infinitesimal bundle that’s ever so slightly larger of the second derivatives (as we need more local information to take the 2nd derivative), and so on.
If we think of a function ω:X(k)→R which vanishes on X⊆X(k) as a “differential kform,” then maybe:
 the functions which vanish to the first order can be thought of as closed forms, dω=0,
 the functions which vanish to the second order on the diagonal X⊆X(k+1) can be thought of as exact forms for they satisfy ω=dβ, s.t. d(ω)=d(dβ)=0.
Attribution
Source : Link , Question Author : jdc , Answer Author : Catherine Ray