I'm reading Hans Kurzweil's "The Theory of Finite Groups", in 1.6.2 (b) it's claimed that let $G=G_1\times G_2$, one has $G'=G_1'\times G_2'$ because:
$$\begin{align} G'&=[G_1G_2,G_1G_2]\\ &=\prod_{i,j}[G_i,G_j]\\ &=G_1'\times G_2'. \end{align}$$
Here $G'$ is the commutator subgroup defined as $$G':= \langle [x,y] | x,y \in G\rangle,$$ and $$[x,y]:=x^{-1}y^{-1}xy.$$
However, I'm a bit confused here about the proof.
First, what does it mean by $\prod_{i,j}[G_i,G_j]$, is it $[G_1,G_1][G_1,G_2][G_2,G_1][G_2,G_2]$?
Second, why $[G_1G_2,G_1G_2]=\prod_{i,j}[G_i,G_j]$?
With $$G'=\langle [a_1b_1,a_2b_2] | a_1,a_2\in G, b_1, b_2 \in G_2 \rangle,$$ I can't move all $G_1$ part to the left side without changing the element $a_1,a_2,b_1,b_2$, because in general $a_1b_1\ne b_1a_1$.