Hint $ $ It is a special case of Wilson's theorem for groups - see my answer here - which highlights the key role played by symmetry (here a $\rm\color{#c00}{negation\ reflection}$ / involution).
Said simpler, since $\,k\,$ is coprime to $\,m\!\iff\! \color{#c00}{-k}\,$ is coprime to $m$, the residue system is closed under $\rm\color{#c00}{negation\ reflection}$, so non-fixed points $\, -k\not\equiv k\,$ all pair up and cancel out of the sum, leaving us with only the sum of the $ $ fixed points $\, -k\equiv k \!\iff\! 2k\equiv 0,\ $ so $\, k\equiv 0\ $ if $\rm\: m\:$ is odd, else $\,k \equiv 0,\ m/2$.
More concretely, every complete residue system is congruent to a balanced residue system, e.g. $\,0,\pm1, \pm 2,\pm3 \pmod{\!7}\,$ and $\,0,\pm1,\pm2, 3\pmod{\!6},\,$ whose sums are clearly $\,0\,$ or $\,m/2,\,$ with same sums for the subset of residues coprime to $\,m,\,$ due to said key property of coprimes being closed under negation.
See Gauss's grade-school trick for summing an arithmetic progression. for further examples and elaboration.