[guided]Assume that the events $A_1,\ldots,A_n$ are independent. By definition, this means that every nonempty subfamily satisfies the product formula:
\begin{align*}
\mathbb P\left(\bigcap_{j\in J} A_j\right)=\prod_{j\in J}\mathbb P(A_j)
\end{align*}
for every nonempty set $J\subset\{1,\ldots,n\}$.
Why do we need more than this? To prove independence of the indicator random variables, we must handle Borel preimages such as $X_i^{-1}(B)$. These preimages can be $A_i$, but they can also be $A_i^c$, $\Omega$, or $\varnothing$. Thus we must show that replacing any of the independent events by its complement preserves the same product formula.
Fix a choice $D_i\in\{A_i,A_i^c\}$ for every $i\in\{1,\ldots,n\}$. Let
\begin{align*}
T:=\{i\in\{1,\ldots,n\}:D_i=A_i\}
\end{align*}
and
\begin{align*}
S:=\{i\in\{1,\ldots,n\}:D_i=A_i^c\}.
\end{align*}
Define the event
\begin{align*}
E_T:=\bigcap_{i\in T}A_i,
\end{align*}
with the convention $E_\varnothing=\Omega$. The event whose probability we need is
\begin{align*}
E_T\cap\bigcap_{i\in S}A_i^c.
\end{align*}
We now remove the complements by finite inclusion-exclusion. Since $S$ is finite, finite additivity of the [probability measure](/page/Probability%20Measure) gives
\begin{align*}
\mathbb P\left(E_T\cap\bigcap_{i\in S}A_i^c\right)
=
\sum_{R\subset S}(-1)^{|R|}
\mathbb P\left(E_T\cap\bigcap_{i\in R}A_i\right).
\end{align*}
Each event inside the probability on the right is an intersection only of events of the form $A_i$, so the assumed independence applies. Hence, for every $R\subset S$,
\begin{align*}
\mathbb P\left(E_T\cap\bigcap_{i\in R}A_i\right)
=
\prod_{i\in T\cup R}\mathbb P(A_i).
\end{align*}
Substituting this into the inclusion-exclusion formula gives
\begin{align*}
\mathbb P\left(E_T\cap\bigcap_{i\in S}A_i^c\right)
=
\sum_{R\subset S}(-1)^{|R|}
\prod_{i\in T\cup R}\mathbb P(A_i).
\end{align*}
The factors with indices in $T$ do not depend on $R$, so they factor out:
\begin{align*}
\mathbb P\left(E_T\cap\bigcap_{i\in S}A_i^c\right)
=
\left(\prod_{i\in T}\mathbb P(A_i)\right)
\sum_{R\subset S}(-1)^{|R|}
\prod_{i\in R}\mathbb P(A_i).
\end{align*}
The remaining finite sum is the expansion of the product
\begin{align*}
\prod_{i\in S}(1-\mathbb P(A_i)).
\end{align*}
Therefore
\begin{align*}
\mathbb P\left(E_T\cap\bigcap_{i\in S}A_i^c\right)
=
\left(\prod_{i\in T}\mathbb P(A_i)\right)
\left(\prod_{i\in S}(1-\mathbb P(A_i))\right).
\end{align*}
Because $\mathbb P(A_i^c)=1-\mathbb P(A_i)$ for each $i$, this becomes
\begin{align*}
\mathbb P\left(\bigcap_{i=1}^nD_i\right)
=
\prod_{i=1}^n\mathbb P(D_i).
\end{align*}
This proves the product formula for all choices of the events and their complements.[/guided]