Lets say you have a quadratic that you factor into root form. To solve for the roots, you let the $y$ value be $0$:
$0 = (x_1-h)(x_2-k)$
Following this you would divide both sides by one of the multipliers. This would leave you with $x_1-h =0$ and therefore $x_1 =h$ and $x_2-k = 0$ and therefore $x_2 = k$.
However since the product of both the multipliers is zero, one of them has to be zero (the product of two or more numbers can't be zero unless atleast one of them is zero). Therefore, aren't you essentially dividing by zero by dividing by one of the multipliers?
For example, $x_1-h = 0$. To solve for $x_2$, you would do the following:
$0 = (x_1-h)(x_2-k)$
$\frac{0}{x_1-h} = \frac{(x_1-h)(x_2-k)}{(x_1-h)}$
$0 = x_2 - k$
$x_2 = k$
However, since $x_1 -h = 0$, didn't you essentially divide by zero to solve for $x_2$? Wouldn't this classify as undefined behaviour?