In my opinion, the motivation is that the set of (path) connected components $\pi_0(X)$ of a space and the loop space $\Omega(X,x_0)$ of a pointed space are two important properties that respect homotopy types.
Since they are both important, we might expect their iterated combinations to be important as well, such as $\pi_0(\Omega^n(X, x_0))$. Of course, $\pi_0(\Omega^n(X, x_0))$ is simply $\pi_n(X, x_0)$.
In my opinion, this point of view also leads to an explanation of why weak homotopy equivalence is the "right" notion of equivalence, which puts further emphasis on the higher homotopy groups.
Suppose we wanted to describe a condition that $X \simeq *$. That is, $X$ has a unique point, but uniqueness should only be up to unique homotopy (where uniqueness is only up to unique homotopy, and so forth).
We can split the requirement that $X \simeq *$ into two parts:
- Any two points are equivalent
- For any two points, $\mathrm{Path}(x,y) \simeq *$
Since $\mathrm{Path}(x,y)$ is homotopy equivalent to $\Omega(X,x)$, this reduces to
- $X$ is path connected
- $\Omega X \simeq *$. (I've omitted the base point since its choice doesn't matter)
This recursive definition leads to a necessary condition that $\pi_0(X) \cong 0$ and $\pi_n(X, x_0) \cong 0$ for all $n>0$.
If we want failure of equivalence to be detectable by homotopies or by homotopies between homotopies or by homotopies between homotopies or so forth, then we need this to be a sufficient condition as well.
Then if we say that $f : X \to Y$ is an equivalence iff its homotopy cofiber isfibers are equivalent to a point, and the long exact sequence reduces this condition to $f$ inducing an isomorphism $\pi_0(X) \to \pi_0(Y)$ and $\pi_n(X,x_0) \to \pi_n(Y,f(x_0))$ for all $n>0$ and all basepoints.