I have a proof in front of me of the theorem that if a category $\mathcal{C}$ has equalisers and all small/finite products, then it has all small/finite limits. I'm not sure how standard the proof is (it's in some notes I've taken rather than a book) but I know the result is quite standard so perhaps you'll be familiar enough with it to help me clear up a confusion.
The proof starts as follows:
Let $D: \mathcal{J} \to \mathcal{C}$ be a diagram with $\mathcal{J}$ small/finite. Form the products $P = \prod \limits_{j \in Ob(\mathcal{J})} D(j)$, and $Q = \prod \limits_{\alpha \in Mor(\mathcal{J})} D(\operatorname{cod} \alpha)$, and define $f,\,g: P \to Q$ by $\pi_\alpha f = \pi_{\operatorname{cod} \alpha}$, $\pi_\alpha g = D(\alpha) \pi_{\operatorname{dom} \alpha}$. Then let $(L,e)$ be the equaliser of $f$ and $g$. We go on to show that $L$ gives a limit cone.
My confusion is early on (I only provided the rest of the proof for context, although I'd imagine it's pretty standard). We define $Q = \prod \limits_{\alpha \in Mor(\mathcal{J})} D(\operatorname{cod} \alpha)$, the product of all the codomains of all the morphisms in $\mathcal{J}$: but then surely isn't that just identical to $P$? Surely, since $\mathcal{J}$ is a category it contains an identity morphism for every object, and that morphism has codomain precisely the object it is the identity for, so isn't $Q$ just the product of all $D(j)$ too? Or is $Q$ simply constructed that way to make it easier to work with $\alpha$? Many thanks.