If $\displaystyle M=\bigsqcup_i M_i$ is the union of connected components

This comes directly from the fact that choosing a function in $\displaystyle M=\bigsqcup_i M_i$ is equivalent to choosing one function for each component. The nuance of the direct sum for the cohomology with compact support lies in the fact that a function with compact support in $M$ is zero in all but finitely many components