Let $X$ be a set and $\mathcal P(X)$ be the set of all subsets of $X$. Furthermore, let $$P=\mathcal P(\Bbb Z_{\ge0}\times\Bbb Z_{\ge0}),$$
which is the set of all subsets $\{(n_1,k_1),(n_2,k_2),...,(n_j,k_j)\}\subset\Bbb Z_{\ge0}\times\Bbb Z_{\ge0}$. Finally, for any $\pi=\{(n_i,k_i):i\in I\}\in P$, define
$$||\pi||=\sum_{i\in I}n_ik_i.$$
Then for any uniformly convergent power series $f(q)=\sum_{n\ge0}a_nq^n$, we have
$$\begin{align}
\prod_{k\ge1}f(q^k)&=\prod_{k\ge1}\left(\sum_{n\ge0}a_nq^{nk}\right)\\
&=\sum_{\pi\in P}\prod_{(n,k)\in\pi}a_nq^{nk}\\
&=\sum_{\pi\in P}q^{||\pi||}\prod_{(n,k)\in\pi}a_n\\
&=\sum_{N\ge0}q^{N}\sum_{\,\,\,\pi\in P\\ ||\pi||=N}\prod_{(n,k)\in\pi}a_n.\tag1
\end{align}$$
The takeaway fact here is that the sum $\displaystyle \sum_{\,\,\,\pi\in P\\ ||\pi||=N}$ is being taken over all partitions of $N$.
In our case,
$$\prod_{k\ge1}\frac{1}{1+q^k}=\sum_{N\ge0}q^N\sum_{\,\,\,\pi\in P\\ ||\pi||=N}\prod_{(n,k)\in\pi}(-1)^n.$$
We can see that each partition $||\pi||=N$ can be re-written as
$$||\pi||=n_1k_1+n_2k_2+...+n_jk_j=\underbrace{k_1+k_1+...+k_1}_{n_1\text{ times}}+...+\underbrace{k_j+k_j+...+k_j}_{n_j\text{ times}}.$$
So the total number of parts in the partition $||\pi||=N$ is given by the quantity
$$\text{#}(\pi)=\sum_{(n,k)\in\pi}n=\sum_{i\in I}n_i.$$
Then we have
$$\prod_{(n,k)\in\pi}(-1)^n=(-1)^{\text{#}(\pi)}.$$
So, given a partition $||\pi||=N$, if there is an even number of parts (that is, $\text{#}(\pi)$ is even) then $(-1)^{\text{#}(\pi)}=1$. Likewise, if $\text{#}(\pi)$ is odd $(-1)^{\text{#}(\pi)}=-1$. Summing over all partitions $||\pi||=N$, we get
$$\begin{align}
\sum_{||\pi||=N}(-1)^{\text{#}(\pi)}=&\text{# of partitions with an even number of parts}\\
&-\text{# of partitions with an odd number of parts}\\
=& p_e(N)-p_o(N).
\end{align}$$
Therefore
$$\prod_{k\ge1}\frac{1}{1+q^k}=\sum_{n\ge0}(p_e(n)-p_o(n))q^n.$$