Doing the summation is the necessary low pass filter step prior to decimation, and an ideal decimation approach when the noise is white (evenly spread across frequency). What this does is ensure that every signal component of every sample is included while the noise gets reduced through averaging (summing is averaging just without the scaling by dividing by the number of samples): when you sum, the value for coherent values (the mean) goes up by the number of samples $N$, while the standard deviation of the noise component goes up by $\sqrt{N}$ .
So this would be the best and typical approach to decimation when there isn't a particularly strong interference present out of band: sum all samples over the decimation interval first, and then down-sample by selecting every Dth sample.
(Note that CIC decimating filters do this specifically).
I explain this further in the following slides showing decimation as the combination of requisite filtering with down-sampling:
A moving average filter of N taps places it's rejection nulls at the ideal location for a decimate by N operation!
The numerical example of this for the case of decimate by four is the output samples $m$ are selected from the input samples $n$ as follows, with $n$ indexing at four times the rate of $m$, so for every four $n$ samples we get one $m$ sample:
Four point moving average:
$y[n] = \frac{x[n]+x[n-1]+x[n-2]+x[n-3]}{4}$
Select (down-sample) every fourth sample:
$w[m] = y[4m]$
The above shows the direct approach, but as suggested in the graphic the cascade-integrator-comb (CIC) decimator does this exact computation more efficiently. There are other posts here that further detail such decimation approaches.