Let's ask a simpler question: is $\frac{x}{x} = 1$ ?
The answer (which follows from the axioms for a field) is that $y = \frac{x}{x} = x \cdot x^{-1}$ is undefined if $x = 0$, so while $\frac{x}x = 1$ for $x \ne 0$, for $x = 0$ it's not even defined.
What about $y = \frac{x-a}{x-a}$? Once again, that's equal to $1$ for $x \ne a$, and undefined for $x = a$.
Now let's bring computers into it. The way we draw plots on a computer is to take a sequence of points $x_1 < x_2 < x_3 < \ldots < x_n$, and plot them with their corresponding $y$-values. In between these points, we, as authors of naive plotting programs, often connect the dots with a line segment because...well, because that's usually right, for nice-enough functions. When your functions have discontinuities, though, it's definitely not right.
In the case of $y = \frac{x}{x}$, if the $x_i$ are all nonzero, then the corresponding $y_i$ are all $1$, and we connect-the-dots to get a horizontal line at $y = 1$, which is correct everywhere except where $x = 0$, which should be a hole in the graph, but won't be. Of course, if one of your $x_i$ actually is zero, then when your computer attempts to compute $\frac{x_i}{x_i} = \frac{0}{0}$, it'll probably produce NaN
, a special value meaning "not a number," and the graphics-plotting part of the program will perhaps ignore it (bad) or perhaps try to use it to plot something (which will be nonsense).
In short, in this case, mathematics and computing have diverged from one another.
What about the $\frac{x-a}{x-a}$ case? The answer's the same: your $y_i$ values will all be $1$, unless some $x_i = a$. But what if $a$ is a number that cannot be represented on a computer, something like $a = \pi$? Then you're guaranteed that the $y_i$ values will all be $1$, and you'll see a horizontal line, even though you should see a line with a hole in it. In short, the plot is guaranteed to be wrong (unless the software is much more subtle than the sort of thing you showed).
Key idea: Computer numbers and real numbers are not the same, and for subtle stuff like well-defined-ness and limits, pretending that they are the same can lead to some bad results, and often deep misunderstandings.