You can define the limit because the function has a "removable discontinuity". That is to say, the function is similar to the $x + 3$ function over its entire domain, except for the point $x = 2$. At that domain value, the function isn't defined.
In other words, your function is formed by taking $x + 3$, and removing a single point to create an infinitesimally narrow discontinuity.
To make that function continuous, all we have to do is declare that its value is 5 at $x = 2$, restoring the only point that is missing. In all other regards, it is identical to the function $x + 3$.
The limit exists because the limit, by definition, involves an imaginary process of approaching a domain point of a function arbitrarily closely, from above or below, without actually reaching that point. In this situation, we can approach $x = 2$ from either above or below. As we approach more and more closely to $2$, the value of the function gets closer and closer to $5$. No matter how close we get, there is room to get closer. Of course, the $5$ isn't actually there, and we must not step on $x = 2$ because then we have "fallen off the function". That's the intuitive gist of the limit.
By the way, when we have a fraction of polynomials, we can apply long division to see whether they "evenly divide". We don't have to perform any factoring:
1 3 <- i.e. x + 3
____________
1 -2 | 1 1 -6 <- i.e. (x^2 + x - 6) / (x - 2)
1 -2 : <- i.e. x - 2 goes into x + 1 once, remainder 3
------ : <- bring down the 6
3 -6
3 -6 <- x - 2 goes 3x - 6 3 times
------
0 <- No remainder!
If you go through this long division and there is a remainder, then the singularity is not removable. Let's try, say $\frac{x^2 + 5x + 1}{x + 3}$:
1 2
___________
1 3 | 1 5 1
1 3
-----
2 1
2 6
------
-5
We have a remainder of -5. What does this mean? This:
$$\frac{x^2 + 5x + 1}{x + 3} = (x + 2) - \frac{5}{x + 3}$$
Basically, the graph of this function looks a lot like $x + 3$ far away from the $x = -3$ singularity. Far away from this point, the residue term $\frac{-5}{x + 3}$ approaches zero and contributes little to the function.
But near $x = -3$ it doesn't look that way: the residue term forces it to curves off into negative infinity as it approaches $-3$ from below, and toward positive infinity as it approaches $-3$ from above, and thus doesn't approach any limit. The discontinuity is not removable, and the function not only has no value at $x = -3$, but also no limit.
So you see, for a fraction of polynomials, it's a special case when you can remove the discontinuity: it's only when they divide evenly with no remainder.