Onset of the magnetic order in $\mathrm{Co}({\mathrm{Ga}}_{1\ensuremath{-}x}{\mathrm{Ni}}_{x})$ and $\mathrm{Co}({\mathrm{Ga}}_{1\ensuremath{-}x}{\mathrm{Cu}}_{x})$ alloys caused by Ni and Cu substitutions is studied in ab initio framework using density functional theory and the coherent potential approximation. It is found that Ni and Cu atoms energetically prefer Ga sites and, contrary to the earlier interpretation, the magnetism develops on the Co sublattice rather then being induced by magnetic Co antisites atoms moved to the Ga sublattice. The changes in the local electronic density of states of Co caused by Ni and Cu substitutions on Ga sublattice lead to the Stoner instability at some critical alloy composition and weak itinerant ferromagnetism, similar to that observed in ${\mathrm{ZnZn}}_{2}$ and ${\mathrm{Ni}}_{3}\mathrm{Al}$ compounds, develops.