My question is why does the subsequent product ansatz for the geometric Brownian motion work?
Suppose we have the gBm $$dS_t=\mu S_tdt+\sigma S_tdB_t,\ S(0)=S_0$$ We assume the solution is given by the product $V_t\cdot U_t$ where $V_t$ is the solution of the ODE $$dV_t=\mu V_tdt,\ V(0)=S_0$$ given by $$V_t=S_0e^{\mu t}$$ and $U_t$ is the solution of the SDE $$dUt=\sigma U_tdB_t,\ U(0)=1$$ given by (Ito's lemma) $$U_t=e^{-\tfrac{1}{2}\sigma^2t+bB_t}.$$ Inserting them in the product ansatz we indeed get the solution $$S_t=V_tU_t=S_0e^{(a-\tfrac{1}{2}\sigma^2)t+bB_t}$$ of the gBm.
My background in differential equations is limited, therefore I would appreciate some information regarding the rationale, which makes this work.
It's a kind of "variation of constants"-approach.
To the given stochastic differential equation
$$dX_t =\mu X_t \, dt + \sigma X_t \, dB_t, \qquad X(0) = X_0 \tag{1}$$
we can associate a ordinary differential equation by removing the stochastic term:
$$dx_t = \mu x_t \, dt \qquad x(0)=c \tag{2}$$
We know that the (unique) solution to $(2)$ is given by
$$x_t = c e^{\mu t}, \qquad t \geq 0. \tag{3}$$
Now the idea is to use a variation-of-constants-approach to get a solution to the original SDE (1). To this end, we let the constant $c$ in (3) depend on $t$ and $\omega$, i.e. we make the ansatz
$$X_t(\omega) = C_t(\omega) e^{\mu t}. \tag{4}$$
If $(X_t)_{t \geq 0}$ is a solution, then it follows from
$$C_t = X_t e^{-\mu t}$$
and Itô's formula that
$$dC_t = \sigma C_t \, dB_t, \qquad C(0)=1.$$
The solution to this SDE can be calculated explicitly, and thus we can plug in $C_t$ into $(4)$. This gives us a candidate for the solution to the SDE (1) and by applying once more Itô's formula we can verify that the process is indeed a solution to the SDE.
The above approach can be easily adapted to more general SDEs of the form
$$dX_t = f(X_t) \, dt + g(X_t) \, dB_t, \qquad X(0)=x_0.$$
Unfortunately, I'm not aware of a general result which gives sufficient conditions which ensure that this variation-of-constants approach works.