TITLE: Direct sum of finitely-many non-abelian groups
QUESTION [7 upvotes]: Consider two non-necessary-abelian groups $(A,\circ)$ and $(B,\circ)$.
It seems that the notion of direct sum $(A,\circ) \oplus (B,\circ)$ is only used in the case that both groups are abelian, and in that case the direct sum coincides with the direct product.
However, the direct sum of permutations is a common notion. More generally, the direct sum of matrices is well-defined, and thus one might define the direct sum of matrix groups.
What is the problem with direct sums of non-abelian groups? What can we do when restricting to finite direct sums, perhaps of merely finite groups?
EDIT:
Considering the answer by MarcPaul and Qiaochu Yuan, I presume that the notion of direct sum of finitely many groups can be used, though it is not necessary natural to do so.
Let $G_1$ and $G_2$ be groups, let $G = G_1 \oplus G_2 := G_1 \times G_2$ be the supposed direct sum.
We want this two satisfy the universal property as described by MarcPaul.
We note that 
$(g_1,g_2) = (g_1,e_2) (e_1,g_2)$ 
for any $(g_1,g_2) \in G_1 \times G_2$.
Let $H$ be any group, and let $f : G \rightarrow H$ be a group homomorphism.
Then we set
$f_1 : G_1 \rightarrow H, \quad g_1 \mapsto (g_1,e_2)$
$f_2 : G_2 \rightarrow H, \quad g_2 \mapsto (e_1,g_2)$
and with that
$f(g_1,g_2) = f(g_1,e_2) f(e_1,g_2) = f_1(g_1) f_2(g_2)$.
In conclusion, if we are given $f : G \rightarrow H$ we can construct $f_i : G_i \rightarrow H$,
if we are given $f_i : G_i \rightarrow H$ we can construct $f : G \rightarrow H$,
and those constructions are inverse to each other.
The natural property holds.

REPLY [4 votes]: There are three interesting ways (that I know of) to combine a family $G_i$ of not-necessarily-abelian groups:

the direct product $\prod_i G_i$,
the direct sum $\bigoplus_i G_i$ (which agrees with the direct product for finitely many $G_i$ but not infinitely many), and 
the free product $\coprod_i G_i$ (the categorical coproduct, which agrees with neither of the above constructions). 

Of these, the direct sum does not appear as a special case of a general categorical construction: the direct product is the categorical product, while the free product is the categorical coproduct. So the direct sum is in some sense the least natural of the three. I don't know of any applications of the direct sum of infinitely many not-necessarily-abelian groups.