Consider running Buchberger's algorithm on the polynomials $f=x_3-x_1^5,$ $g=x_2-x_1^3$ with lexicographic order and $x_1>x_2>x_3$. We first compute the $S$-polynomial. We have $LT(f)=-x_1^5,\ LT(g)=-x_1^3$. So $$S(f,g)=\frac{x_1^5}{-x_1^5}(x_3-x_1^5)-\frac{x_1^5}{-x_1^3}(x_2-x_1^3)=x_1^2x_2-x_3.$$
Now, this link says the remainder when divide $S(f,g)$ with $\{f,g\}$ is $S(f,g)$. So, we add $S(f,g)$ to the current Groebner basis.
I didn't understand this part. The polynomial $x_1^2x_2-x_3$ can be expressed as $-f+x_1^2g$. So, the remainder when we divide $S(f,g)$ with $\{f,g\}$ is 0 right?
Reduction (multivariable division) and ideal membership are generally different concepts. "$S(f,g)$ is not reduced to $0$ by $\{f,g\}$" does not necessarily mean $S(f,g)\not\in\langle f,g\rangle$. Reduction and ideal membership are matched when we use Groebner basis (that's one of the reasons why we want to compute Groebner basis). Anyway, let's follow the algorithm as it is defined.
Let me explain the difference in another way. Can you say that $1$ is divisible by $\{2,3\}$ just because $1$ can be expressed as $-2 + 3$?