[guided]The truncation serves a crucial technical purpose. The maximal function $X_n^*$ may not belong to $L^p$ — indeed, proving that it does is the content of the theorem. By working with $Y_K = \min\{X_n^*, K\}$, we ensure all quantities are finite, which permits division by $\|Y_K\|_p^{p-1}$ in a later step. We will send $K \to \infty$ at the end.
The layer-cake identity (also called Cavalieri's principle) is the formula
\begin{align*}
Z^p = \int_0^\infty p \lambda^{p-1} \mathbb{1}_{\{Z \geq \lambda\}} \, d\mathcal{L}^1(\lambda),
\end{align*}
valid pointwise for any non-negative measurable $Z$. This can be verified by computing the right-hand side: for fixed $\omega$, the indicator $\mathbb{1}_{\{Z(\omega) \geq \lambda\}} = 1$ for $\lambda \in [0, Z(\omega)]$ and vanishes otherwise, so the integral equals $\int_0^{Z(\omega)} p \lambda^{p-1} \, d\mathcal{L}^1(\lambda) = Z(\omega)^p$.
Taking expectations and applying [Fubini's Theorem](/theorems/513) to exchange $\mathbb{E}$ and $\int_0^\infty$ — valid because $(\Omega, \mathcal{F}, \mathbb{P})$ is a probability space (hence $\sigma$-finite), $((0,\infty), \mathcal{B}((0,\infty)), \mathcal{L}^1)$ is $\sigma$-finite, and the integrand is non-negative — we obtain
\begin{align*}
\mathbb{E}[Y_K^p] = \int_0^\infty p \lambda^{p-1} \mathbb{P}(Y_K \geq \lambda) \, d\mathcal{L}^1(\lambda).
\end{align*}
Since $Y_K = \min\{X_n^*, K\}$, the level set $\{Y_K \geq \lambda\}$ equals $\{X_n^* \geq \lambda\}$ when $\lambda \leq K$, and is empty when $\lambda > K$. The upper [limit](/page/Limit) of integration therefore reduces to $K$.[/guided]