If one doesn't know a motivation, it's hard to memorize such a theorem. So do I.
Rudin RCA p.30
Let $(X,\Sigma,\mu)$ be a measure space such that $\mu(X)<\infty$ and $f\in L^1(\mu)$.
Let $S$ be a closed subset of $\mathbb{C}$
If [$\forall E\in\Sigma, \mu(E)>0 \Rightarrow \frac{1}{\mu(E)}\int_E f d\mu \in S$], then $f(x)\in S$ almost everywhere.
Maybe since it's deserves to be marked as a theorem in the text, Rudin provided it.
A problem is, he never gives a motivation.
I don't know any motivation for this theorem (which looks similar to the mean value theorem to me). And in the hypothesis, why $S$ has to be closed? The theorem still holds even when $S$ is a $F_\sigma$ set. And what is an example this theorem is applied?
Rudin later uses it to prove the Radon-Nikodym theorem (theorem 6.10 on pp. 121-123) as well as a couple of further results following Radon-Nikodym (theorems 6.12 and 6.16).