I'll explain it this way. If you sketch the graph of y=x/x, you get the same line as y=1 except that when x=0, you have an open dot at where (0,1) should be.
(x^2-5x+6) / (x^2-x-2) = (x-3)/(x+1) for all x not equal to -1 or 2
The two equations are equivalent at all other x values. x=-1 really is an asymptote. x=2 is what we call a "removable singularity"; you would have an open dot at where x=2 would be on (x-3)/(x+1), but not an asymptote.
VCE doesn't teach asymptotes formally enough. Just because the denominator is zero does NOT mean that the function has an asymptote there. y=x/x is a simple example. Strictly speaking, y=1/x^2 only has an asymptote at x=0 because when y=>infinity, x=>0 and vice versa. You let each of x,y approach infinity to find asymptotes.