Your calculation assumed that $X_i$ and $X_j$ are independent. For if we look at your second term, it assumes that if $\Pr(X_i=1)=p$ and $\Pr(X_j=1)=p$, then $\Pr((X_i=1)\cap (X_j=1))=p^2$.
It is true that if $U$ and $V$ are any independent random variables such that $E(U)$ and $E(V)$ exist, then $E(UV)=E(U)E(V)$.
However, if we do not have independence, it is perfectly possible that $E(X_iX_j)\ne E(X_i)E(X_j)$, even if $X_i$ and $X_j$ are indicator random variables.
For example, toss a fair coin once. Let $X_1=1$ if we get a head, and $0$ otherwise. Let $X_2=1$ if we get a tail, and $0$ otherwise.
Then $E(X_1)=E(X_2)=\frac{1}{2}$. However, $X_1X_2$ is always $0$, so $E(X_1X_2)=0$. Thus, in this example, $E(X_1X_2)\ne E(X_1)E(X_2)$.