I am reading through Mathematical Logic by Ian Chiswell and Wilfrid Hodges. In chapter 2 they introduce natural deduction rules. Before stating a rule, the authors (usually) motivate the rule by showing some informal proof that uses that rule's reasoning. For example, to motivate the rule (RAA), which I've thrown at the bottom of this post for reference, the authors point to the following proof that there are infinitely many prime numbers:
"Assume not. Then there are only finitely many prime numbers
$$ p_1,...,p_n $$
Consider the integer
$$ q = (p_1 \times ... \times p_n) + 1 $$
The integer $q$ must have at least one prime factor $r$. But then $r$ is one of the $p_i$, so it cannot be a factor of $q$. Hence $r$ both is and is not a factor of $q$; absurd! So our assumption is false and the theorem is true."
This proof only seems to motivate part of the (RAA) rule, namely the case where there IS an assumption to discharge (we conclude that there are infinitely many prime numbers, discharging the assumption that "it is not true that there are infinitely many prime numbers"). However, this rule can also be used in cases where nothing is discharged (in other words, this rule contains the principle of explosion/ex falso quodlibet as a special case; see here for a related discussion). For example, the book starts out a proof of the sequent $\vdash ((\lnot(\phi\to\psi))\to\phi)$ with
$$ \begin{align} \dfrac{\phi \qquad \qquad (\neg\phi)} {\qquad \quad \dfrac{\quad \bot\quad} { \quad\psi \quad} (RAA) }(\neg E) \end{align} $$
where $\psi$ is then used further on in the proof... I don't recall ever seeing a proof in math that went something like this, where a contradiction was reached and we kept going.
So, my question in short is: what is an example of a proof that uses the principle of explosion in this way, or more generally, just how is the principle of explosion used in "normal" math?
Statement of (RAA) for reference: Suppose we have a derivation $$ \\\\\ D \\\\\ \bot $$ whose conclusion is $\bot$. Then there is a derivation $$ \require{cancel}(\cancel{~\lnot\phi~}) \\\\\ D \\\\\ \quad \quad \quad \dfrac{\bot}{\phi}(RAA) $$