The abelianization of a group $G$ is an abelian group $A$ and a homomorphism $\varphi: G \to A$ such if $B$ is any abelian group, and $\phi: G \to B$ is any homomorphism, there is a unique homomorphism $\psi: A \to B$ (which might depend on $\phi$) such that $\psi\varphi = \phi$.
Now, I am reading some lecture notes, and the following is asserted.
If $G = \langle e_1, e_2, \ldots, e_n \mid w_1, w_2, \ldots, w_m\rangle$ is a finitely presented group, then$$A = \langle e_1, e_2, \ldots, e_n \mid w_1, \ldots, w_m, [e_1, e_2], \ldots, [e_i, e_j], \ldots, [e_{n - 1}, e_n]\rangle$$is a presentation of the abelianization of $G$, where the homomorphism $\varphi: G\to A$ sends the equivalence class of $w$ in $G$ to the equivalence class of $w$ in $A$ for each word $w \in G$.
To me, this is not a priori clear at all. Could anybody tell me why this is true?