Let's consider the function:
$$ f(x) = \frac {x^2 + x - 6}{x - 2} $$
At x = 2, the value fo the function is undefined, because $ x - 2 $ = 0. But if factor the expression on the numerator, we get $ \frac {(x + 3) (x-2)}{x-2} $, which on simplifying yields $ x + 3 $. At $ x = 2 $, the function gives 5, which is not what we get before simplifying.
If all we do too the initial function is simple algebraic manipulation, shouldn't both functions yield the same value?