Why doesn't the polynomial factor theorem hold for polynomials in a non-field ring?
Solution 1:
The single factor theorem holds over any commutative ring. But multiple factors need not, e.g.
Bifactor Theorem $\ $ Suppose that $\rm\,a,b\,$ are elements of a commutative ring $\rm\,R\,$ and $\rm\:f\in R[x]\,$ is a polynomial with coefficient in $\rm\,R.\,$ If $\rm\ \color{#C00}{a\!-\!b}\ $ is cancelable in $\rm\,R\,$ then
$$\rm f(a) = 0 = f(b)\ \iff\ f\, =\, (x\!-\!a)(x\!-\!b)\ h\ \ for\ \ some\ \ h\in R[x]$$
Proof $\,\ (\Leftarrow)\,$ clear. $\ (\Rightarrow)\ $ Applying Factor Theorem twice, while canceling $\rm\: \color{#C00}{a\!-\!b},$
$$\begin{eqnarray}\rm\:f(b)= 0 &\ \Rightarrow\ &\rm f(x)\, =\, (x\!-\!b)\,g(x)\ \ for\ \ some\ \ g\in R[x]\\ \rm f(a) = (\color{#C00}{a\!-\!b})\,g(a) = 0 &\Rightarrow&\rm g(a)\, =\, 0\,\ \Rightarrow\,\ g(x) \,=\, (x\!-\!a)\,h(x)\ \ for\ \ some\ \ h\in R[x]\\ &\Rightarrow&\rm f(x)\, =\, (x\!-\!b)\,g(x) \,=\, (x\!-\!b)(x\!-\!a)\,h(x)\end{eqnarray}$$
Beware $\ $ The theorem may fail when $\rm\ a\!-\!b\ $ is not cancelable (i.e. is a zero-divisor), e.g.
$\rm mod\ 8\!:\,\ f(x)=x^2\!-1\,\Rightarrow\,f(3)\equiv 0\equiv f(1)\,$ $\rm but\ \ x^2\!-1\not\equiv (x\!-\!3)(x\!-\!1)\equiv x^2\!-4x+3$
Solution 2:
What theorem are you calling the "factor theorem" ? If you mean this result:
(1) If $a$ is a root of a polynomial $f(x)$, then $f(x) = (x-a)q(x)$ for some polynomial $q(x)$.
It is true that (1) continues to hold over arbitrary rings. However, some standard consequences of (1) no longer hold over arbitrary rings. For example (to take the example from your link),
(2) If $f(x)$ is a polynomial of degree $n$, then $f(x)$ has at most $n$ roots.
This is false over general rings, as the example in your link shows. The usual proof of (2) is to take a root $a$ and then use (1) to write $f(x) = (x-a)q(x)$. The next step is to note that if $c$ is any other root of $f(x)$ besides $a$, then $c$ is a root of $q(x)$. This step fails in a general ring. For if we substitute $x=c$ we get $0 = f(c) = (c-a)q(c)$, and in a general ring we cannot cancel the $c-a$ term (even though we know it is nonzero) to conclude that $q(c)=0$.