I agree that the long exact sequence in homotopy groups of a fibration follows from the fact that fibrations are defined using a mapping property in which the fibration is the target.

One way to understand why homology behaves well with respect to cofibrations is to spell out your remark that
"homology is just homotopy of another space". This is true, but not obvious. There are a number of constructions of ordinary homology which take the following form.

One finds a functor $F$ from (pointed) spaces to (pointed) spaces which takes cofibrations to quasifibrations. (A quasifibration is something for which you have a long exact sequence of homotopy groups, for example a Serre fibration). And then $H_* (X) \cong \pi_* F(X).$ If $X\to Y \to Z$ is a cofibration (maybe a cofibration of CW complexes), then $\dots \to \pi_* F(X) \to \pi_* F(Y) \to \pi_* F(Z) \to \ldots$ is the long exact sequence in homology associated to the cofibration.

Here are several contexts in which one can describe such a functor $F$.

First, a formal approach. Let $\mathbf{S}$ denote the category of spectra: it is connected to the category $\mathbf{T}$ of spaces by adjoint functors $\Sigma^\infty: \mathbf{T} \to \mathbf{S}$ and $\Omega^\infty: \mathbf{S} \to \mathbf{T}.$ There a spectrum called the "Eilenberg-MacLane" spectrum, denoted $H\mathbb{Z}$: its job is to represent singular cohomology, and one can take $F(X) = \Omega^\infty ((\Sigma^\infty X) \wedge H\mathbb{Z})$.

Why does $F$ have the cofibration-to-quasifibration property? Well, the way that this is set up, $\Sigma^\infty$ preserves cofibrations of CW complexes, and $\Omega^\infty$ preserves fibrations of fibrant objects, and in the category of spectra every cofibration is equivalent to a fibration.

To be more explicit about $H\mathbb{Z}$, you can define $F(X) = \lim (\ldots \Omega^k(X \wedge K(\mathbb{Z},k)) \to \Omega^{k+1} (X\wedge K(\mathbb{Z},k+1))a \ldots),$ where the limit is a colimit and the maps defining the system arise from the maps $\Omega K(\mathbb{Z},k) \simeq \Omega K(\mathbb{Z},k+1)$.

Second, the Dold-Thom theorem says that one can take $F(X) = Sp^\infty (X).$ Here $Sp^n(X) = X^n/\Sigma_n$, and $Sp^\infty(X) = \lim \ldots Sp^n(X) \to Sp^{n+1}(X) \ldots$, again the limit is a colimit.

Third, if you're willing to allow $X$ to be a simplicial set, then one can take then one can take $F(X) = \mathbb{Z}X$, the simplicial set whose $n$ simplices are the free abelian group on the $n$-simplices of $X$. (This approach is due to Dan Kan; see the proceedings of the Hurewicz conference)

All of this is to focus attention on functors which take cofibrations to quasifibrations. In fact all $-1$-connected generalized homology theories (at least the ones associated to cohomology theories: are there homology theories which are not? I don't know) are of the form $E_* X = \pi_* G(X)$, where $G$ is a functor which takes cofibrations to quasifibrations. Indeed one takes $G(X) = \Omega^\infty (\Sigma^\infty X \wedge R)$, where $R$ is the spectrum representing the cohomology theory. This approach goes back to G. W. Whitehead.

One of the more compact discussions of such a functor, which I like, is in an article by G. Segal in Springer LNM 575; he gives a construction of connective real $K$-homology there. Really he's showing how to generalize the work of Dold and Thom: Segal's argument applies just as well to $Sp^\infty(X)$.

I apologize that throughout I have done a poor job of saying how to handle basepoints.