Very often, we define the limit of a function as $0 < |x -a|< \delta \implies |f(x) - L|< \epsilon$.
A lot of times we don't let $x$ equal $a$, and the reason for this is clear in the case of discontinuity. However, the book I am reading also doesn't allow $x = a$ for continuous functions.
The function may be undefined at $x=a$. For example, take $a=0$ and let $f(x)=(\sin x)/x\;(x\in \Bbb R;x\neq 0).$ Then the limit is well defined at $0$, even though $f$ is not. (Of course, in this case, we can easily and naturally extend the domain of $f$ by using the limit.)