The commutator subgroup is a verbal subgroup. That means that for any group homomorphism $\varphi\colon G\to K$, you have that $\varphi([G,G])\subseteq [K,K]$. If $\varphi$ is onto, then the induced map on commutator subgroups is also onto.
Applying this to the quotient map $G/H$, you have that $\pi([G,G])$ maps $[G,G]$ onto $[G/H, G/H]$. The kernel of this map is $[G,G]\cap H$, so by the isomorphism theorems we have $\left[\frac{G}{H},\frac{G}{H}\right] \cong \frac{[G,G]}{[G,G]\cap H} \cong \frac{H[G,G]}{H}.$ Follow through the definitions given by the isomorphism theorems, and you'll see that the isomorphism from $\frac{H[G,G]}{H}$ to $[G/H,G/H]$ is indeed given by mapping $huH$ to $\pi(u)$ (or by mapping from $H[G,G]$ onto $[G/H,G/H]$ via $hu\mapsto \pi(u)$). This is the map you give (though you only describe it for a generating set of $H[G,G]$).
The same result holds for any verbal subgroup $\mathfrak{V}(G)$: if $N$ is normal, then $\mathfrak{V}\left(\frac{G}{N}\right) \cong \frac{\mathfrak{V}(G)}{\mathfrak{V}(G)\cap N} \cong \frac{N\mathfrak{V}(G)}{N}.$ E.g., for the subgroup generated by the $n$th powers, $G^n$, we have $\left(\frac{G}{N}\right)^n \cong \frac{NG^n}{N}.$