Answer
There is no contradiction, as the theorem does not predict anything for functions
that are not continuous on $[a, b]$.
Work Step by Step
Rolle's Theorem
Let $f$ be continuous on the closed interval $[a, b]$ and differentiable on the open interval $(a, b)$ .
If $f(a)=f(b)$ , then there is at least one number $c$ in $(a, b)$ such that $f^{\prime}(c)=0.$
----
f is not continuos at x=0
(the left and right sided limits exist, and are 1, so a limit exists,
but it does not equal f(0)=0),
so the theorem does not apply.
There is no contradiction, as the theorem does not predict anything for functions such as this,
ones that are not continuous on $[a, b]$.