This is a follow-up to another question.

A good interpretation of having an $n$-dimensional hole is a space $X$ is that some image of the sphere $\mathbb{S}^n$ in this space given by a mapping $f: \mathbb{S}^n \rightarrow X$ cannot shrink down to a point. The matter of "shrinking to a point" is best expressed by being $f$ homotopic to some constant map. Next, the homotopy groups $\pi_n$ can be defined as the homotopy classes of base-point preserving maps from $\mathbb{S}^n$ to $X$. In this way it might be argued that the homotopy groups $\pi_n$ should best capture the holes in $X$.

But this is not so. One has the most satisfying result that for $i \geq 1$ the homology $H_i (\mathbb{S}^n) $ is nontrivial iff $n = i$. But the higher homotopy groups of spheres are very complicated.

Why does this complication occur? Why are homology groups far better for capturing the holes than the homotopy groups, which are intuitively better suited, but are not actually so? In the case of $1$-dimensional holes, the homology $H_1$ and $\pi_1$ captures the holes equally well; but of course in this case the former is the abelianization of the latter.