Marginalization is an implicit consequence of Monte Carlo integration.
We use (Markov chain) Monte Carlo to approximation posterior expectations through samples,
\hat{f}{N} = \frac{1}{N} \sum{n = 1}^{N} f(x)
\approx
E_pi [ f ] = \int dx pi(x) f(x).
Now let x be two dimensional, x = (x1, x2), but the function whose expectation we’re taking depend only on x1. Then
\hat{f}{N} = \frac{1}{N} \sum{n = 1}^{N} f(x_1)
\approx
E_pi [ f ] = \int dx_1 dx_2 pi(x_1, x_2) f(x_1).
But now we can marginalize x_2 out of the exact integral to give
\hat{f}{N} = \frac{1}{N} \sum{n = 1}^{N} f(x_1)
\approx
E_pi [ f ] = \int dx_1 pi(x_1) f(x_1).
In other words, if you run a Markov chain over the joint space (x_1, x_2) and then use samples from only one component to estimate expectations then we are implicitly marginalizing over the other component! This means that you can compute convolutions like the scale mixture in the case study by building a Stan program for the joint model and let the integration happen implicitly.