Example 5 Let $x_{1}, x_{2}, x_{3}$ be the roots of the equation
$$
x^{3}-6 x^{2}+a x+a=0
$$

Find all real numbers $a$ such that
$$
\left(x_{1}-1\right)^{3}+\left(x_{2}-2\right)^{3}+\left(x_{3}-3\right)^{3}=0
$$

holds, and for each such $a$, find the corresponding $x_{1}, x_{2}, x_{3}$.
Solve: By Vieta's formulas, we know $x_{1}+x_{2}+x_{3}=6$.
$$
\begin{array}{l}
\text { Hence }\left(x_{1}-1\right)+\left(x_{2}-2\right)+\left(x_{3}-3\right)=0 \\
\quad \Rightarrow 3\left(x_{1}-1\right)\left(x_{2}-2\right)\left(x_{3}-3\right)=0 \\
\quad \Rightarrow\left\{\begin{array} { l } 
{ x _ { 1 } = 1 , } \\
{ a = \frac { 5 } { 2 } }
\end{array} \left\{\begin{array} { l } 
{ x _ { 2 } = 2 , } \\
{ a = \frac { 16 } { 3 } ; }
\end{array} \left\{\begin{array}{l}
x_{3}=3, \\
a=\frac{27}{4} .
\end{array}\right.\right.\right.
\end{array}
$$
(1) When $a=\frac{5}{2}$, the original equation becomes
$$
\begin{array}{l}
x^{3}-6 x^{2}+\frac{5}{2} x+\frac{5}{2}=0 \\
\Rightarrow x_{1}=1, x_{2,3}=\frac{5}{2} \pm \frac{\sqrt{35}}{2} ;
\end{array}
$$
(2) When $a=\frac{16}{3}$, the original equation becomes
$$
\begin{array}{l}
x^{3}-6 x^{2}+\frac{16}{3} x+\frac{16}{3}=0 \\
\Rightarrow x_{1,2}=\frac{6 \pm 2 \sqrt{15}}{3}, x_{3}=2 ;
\end{array}
$$
(3) When $a=\frac{27}{4}$, the original equation becomes
$$
\begin{array}{l}
x^{3}-6 x^{2}+\frac{27}{4} x+\frac{27}{4}=0 \\
\Rightarrow x_{1,2}=\frac{3 \pm 3 \sqrt{2}}{2}, x_{3}=3 .
\end{array}
$$

Therefore, the real numbers $a$ that satisfy the conditions are three: $\frac{5}{2}, \frac{16}{3}, \frac{27}{4}$.