I thought about the problem of how to understand coproduct and direct sum and I think this could be thought of as a way of thinking. I am posting this to verify if my understanding is correct.
So what we need is the following.
Given data: $$\begin{align} &f_i\colon X_i\to P \\ &g_i\colon X_i \to X \end{align}$$ Now define in someway $$g\colon P \to X$$
$P$ is the coproduct we are trying to define. Please note that we need to define $g$ given $g_i$. $g$ is actually to be defined so that it completes the commutative diagram and then only $P$ is the coproduct.
The most obvious way of defining $g$ on each of the basis elements is $g := \sum g_i$ where $i$ ranges over the index set.
Now all our group, ring homomorphism operations are defined over finite sums or finite products. So there is no way we could make sense of an infinite sum in the definition of $g$. Thus we have to restrict it to finite sum. Hence if we have to restrict it to finite sum then only a finite number of elements of $P$ could be non zero and the rest are all $0$s.
This is my understanding and if somebody could point out that there is some gaps it would be very helpful.
Thanks