Bonferroni inequality is closely related to the partial sum of alternating binomial coefficients.
Let's consider an element $w$ in sample space and literally count it in the left-hand side and right-hand side of the inequality. If $w$ belongs to none of $A_1$ to $A_n$, then it is not counted in $\bigcup_{i-1}^n A_i$, and it's not counted in any $A_i$, any $A_i\cap A_i$, ..., and any $A_{i_1}\cap A_{i_2}\ldots\cap A_{i_k}$.
If $w$, however, is contained in $r$ sets from $\{A_1, A_2, \ldots, A_n\}$, let's just say $w$ lies in $A_1, \ldots , A_r$. Then $w$ is counted exactly once in $\bigcup_{i-1}^n A_i$ (LHS), and counted ${r\choose 1}-{r\choose 2}+ \ldots +(-1)^{k-1}{r\choose k}$ times on the right-hand side, where for $k\gt r$, ${r\choose k}=0$. Now, let's compare the counts on both sides.
- If $k=r$, using bionomial theorem to exapnd $(1-1)^n$, we have $1={r\choose 1}-{r\choose 2}+ \ldots +(-1)^{r-1}{r\choose r}$. That is, $w$ is counted the same times on both sides.
- If $k, again compare $1$ (LHS) and ${r\choose 1}-{r\choose 2}+ \ldots +(-1)^{k-1}{r\choose k}$ (RHS). Specifically, let's find $f(k) = 1-{r\choose 1}-{r\choose 2} \ldots (-1)^{k-1}{r\choose k}$ instead. In fact, $f(k)$ is the partial sum of alternating bionomial coefficients and has closed form $(-1)^k {r-1 \choose k}$. This can be easily proved by induction and Pascal's rule, see here. Now, it's easy to see when $k$ is odd, $f(k)$ is negative and hence $w$ is counted more times on RHS; when $k$ is even, $f(k)$ is positive and hence $w$ is counted less times on the RHS.
In summary, for odd $k$, $w$ is counted either equal or more times on the RHS and hence the first $k$ terms on RHS is an upper bound of $P\left(\bigcup_{i=1}^n A_i\right)$; and for even $k$, $w$ is counted either equal or fewer times on the RHS and hence the first $k$ terms on RHS is an lower bound of $P\left(\bigcup_{i=1}^n A_i\right)$. The alternating partial sum of binomial coefficients results in the alternating Bonferroni bounds.