Example 23 Given an integer $n \geqslant 4$, for any non-negative real numbers $a_{1}, a_{2}, \cdots, a_{n}, b_{1}, b_{2}, \cdots, b_{n}$ satisfying
$$a_{1}+a_{2}+\cdots+a_{n}=b_{1}+b_{2}+\cdots+b_{n}>0$$

find the maximum value of $\frac{\sum_{i=1}^{n} a_{i}\left(a_{i}+b_{i}\right)}{\sum_{i=1}^{n} b_{i}\left(a_{i}+b_{i}\right)}$.
By homogeneity, we may assume $\sum_{i=1}^{n} a_{i}=\sum_{i=1}^{n} b_{i}=1$. First, when $a_{1}=1, a_{2}=$ $a_{3}=\cdots=a_{n}=0, b_{1}=0, b_{2}=b_{3}=\cdots=b_{n}=\frac{1}{n-1}$, we have $\sum_{i=1}^{n} a_{i}\left(a_{i}+b_{i}\right)=$ $1, \sum_{i=1}^{n} b_{i}\left(a_{i}+b_{i}\right)=\frac{1}{n-1}$, hence
$$\frac{\sum_{i=1}^{n} a_{i}\left(a_{i}+b_{i}\right)}{\sum_{i=1}^{n} b_{i}\left(a_{i}+b_{i}\right)}=n-1$$

Next, we prove that for any $a_{1}, a_{2}, \cdots, a_{n}, b_{1}, b_{2}, \cdots, b_{n}$ satisfying $\sum_{i=1}^{n} a_{i}=\sum_{i=1}^{n} b_{i}=1$, we have
$$\frac{\sum_{i=1}^{n} a_{i}\left(a_{i}+b_{i}\right)}{\sum_{i=1}^{n} b_{i}\left(a_{i}+b_{i}\right)} \leqslant n-1$$

Since the denominator is positive, the above inequality is equivalent to

that is,
$$\begin{array}{l}
\sum_{i=1}^{n} a_{i}\left(a_{i}+b_{i}\right) \leqslant(n-1) \sum_{i=1}^{n} b_{i}\left(a_{i}+b_{i}\right) \\
(n-1) \sum_{i=1}^{n} b_{i}^{2}+(n-2) \sum_{i=1}^{n} a_{i} b_{i} \geqslant \sum_{i=1}^{n} a_{i}^{2}
\end{array}$$

By symmetry, we may assume $b_{1}$ is the smallest among $b_{1}, b_{2}, \cdots, b_{n}$, then we have
$$\begin{aligned}
(n-1) \sum_{i=1}^{n} b_{i}^{2}+(n-2) \sum_{i=1}^{n} a_{i} b_{i} & \geqslant(n-1) b_{1}^{2}+(n-1) \sum_{i=2}^{n} b_{i}^{2}+(n-2) \sum_{i=1}^{n} a_{i} b_{1} \\
& \geqslant(n-1) b_{1}^{2}+\left(\sum_{i=2}^{n} b_{i}\right)^{2}+(n-2) b_{1} \\
& =(n-1) b_{1}^{2}+\left(1-b_{1}\right)^{2}+(n-2) b_{1} \\
& =n b_{1}^{2}+(n-4) b_{1}+1 \\
& \geqslant 1=\sum_{i=1}^{n} a_{i} \geqslant \sum_{i=1}^{n} a_{i}^{2}
\end{aligned}$$

Therefore, the maximum value sought is $n-1$.