Taken from Dummit /Foote book page no : $520$
I have some doubt in given below proof , my doubt marked in red line

My doubt is that why its contradicts the minimality of $g(x)$ unless $r(x) = 0 ?$
My thinking : Here we have already taken $r( \alpha)= 0$ implies $r(x)=0$
Then why it written unless $r(x)=0$ ?
$g(x)$ is chosen to be a nonzero$^\ast$ polynomial of minimal degree that has $\alpha$ has a root. Then later in the proof, there is a polynomial $r(x)$ that has $\alpha$ as a root and has degree smaller than $g(x)$. So the only possible way this can happen is that $r(x)$ is the zero polynomial.
So it's not just that "$r(\alpha)=0$ implies $r(x)=0$"; rather it's that "$r(\alpha)=0$ and $\deg(r(x))<\deg(g(x))$ implies $r(x)=0$."
$^*$ The word "nonzero" is not present in the proof when $g(x)$ is chosen. But this is implied by the context.