Example 5 For non-negative real numbers $x_{1}, x_{2}, \cdots, x_{n}$ satisfying $x_{1}+x_{2}+\cdots+x_{n}=1$, find the maximum value of $S=\sum_{j=1}^{n}\left(x_{j}^{4}-x_{j}^{5}\right)$. (40th IMO Chinese National Team Selection Exam)
Let $x_{1}, x_{2}, \cdots, x_{n}$ be the number of non-zero elements as $k$, without loss of generality, assume $x_{1} \geqslant x_{2} \geqslant \cdots \geqslant x_{k}>0, x_{k+1}=x_{k+2}=\cdots=x_{n}=0$. If $k \geqslant 3$, then let $x_{i}^{\prime}=x_{i}(i=1,2, \cdots, k-2), x_{k-1}^{\prime}=x_{k-1}+x_{k}, x_{k}^{\prime}=x_{k+1}^{\prime}=\cdots=x_{n}^{\prime}=0$, because $x_{k-1}+x_{k} \leqslant \frac{2}{n} \leqslant \frac{2}{3}\sum_{j=1}^{n}\left(x_{j}^{4}-x_{j}^{5}\right)$. As long as the number of non-zero variables is not less than 3, the above adjustment can be performed. After at most $n-2$ adjustments, $x_{3}, \cdots, x_{n}$ can be adjusted to 0, while $S$ does not decrease. Let the current $x_{1}, x_{2}$ be $a, b$, then $a+b=1$, and $S=a^{4}(1-a)+b^{4}(1-b)=a^{4} b + a b^{4}=a b\left(a^{3}+b^{3}\right)=a b(a+b)\left(a^{2}-a b+b^{2}\right)=a b\left[(a+b)^{2}-3 a b\right]=a b(1-3 a b)=\frac{1}{3}(3 a b)(1-3 a b) \leqslant \frac{1}{3} \times \frac{1}{4}=\frac{1}{12}$.

Furthermore, when $x_{1}=\frac{3+\sqrt{3}}{6}, x_{2}=\frac{3-\sqrt{3}}{6}, x_{3}=\cdots=x_{n}=0$, $S=\frac{1}{12}$, hence $S_{\max }=\frac{1}{12}$.