[example: Two Bernoulli Trials Before the Definition]
Let $X_1,X_2$ be independent random variables with $X_i\sim\operatorname{Ber}(p)$, so $\mathbb P(X_i=1)=p$ and $\mathbb P(X_i=0)=1-p$. Since each $X_i$ takes only the values $0$ and $1$, the sum $X_1+X_2$ can take only the values $0,1,2$. For the value $0$, both trials must be $0$, and independence gives
\begin{align*}
\mathbb P(X_1+X_2=0)=\mathbb P(X_1=0,X_2=0)=\mathbb P(X_1=0)\mathbb P(X_2=0)=(1-p)^2.
\end{align*}
For the value $1$, exactly one trial must be $1$, so the two disjoint cases are $(X_1,X_2)=(1,0)$ and $(X_1,X_2)=(0,1)$. Hence
\begin{align*}
\mathbb P(X_1+X_2=1)=\mathbb P(X_1=1,X_2=0)+\mathbb P(X_1=0,X_2=1).
\end{align*}
Using independence in each term,
\begin{align*}
\mathbb P(X_1+X_2=1)=p(1-p)+(1-p)p=2p(1-p).
\end{align*}
For the value $2$, both trials must be $1$, so
\begin{align*}
\mathbb P(X_1+X_2=2)=\mathbb P(X_1=1,X_2=1)=\mathbb P(X_1=1)\mathbb P(X_2=1)=p^2.
\end{align*}
The polynomial $(1-p)+pz$ stores the two probabilities of one Bernoulli trial as the constant coefficient and the coefficient of $z$. Multiplying the two copies gives
\begin{align*}
((1-p)+pz)^2=((1-p)+pz)((1-p)+pz).
\end{align*}
Expanding term by term,
\begin{align*}
((1-p)+pz)((1-p)+pz)=(1-p)^2+(1-p)pz+pz(1-p)+p^2z^2.
\end{align*}
Since $(1-p)pz+pz(1-p)=2p(1-p)z$, this becomes
\begin{align*}
((1-p)+pz)^2=(1-p)^2+2p(1-p)z+p^2z^2.
\end{align*}
The coefficient of $z^0$ is $\mathbb P(X_1+X_2=0)$, the coefficient of $z^1$ is $\mathbb P(X_1+X_2=1)$, and the coefficient of $z^2$ is $\mathbb P(X_1+X_2=2)$. The point is not the algebra for two trials, but that multiplication is already doing the same bookkeeping as the distribution of an independent sum.
[/example]