What is the definition of continuity in $\mathbb{R}$?
We say that a function $f:X\to\mathbb{R}$ is continuous at $a\in X$ iff
\begin{align*}
(\forall\varepsilon > 0)(\exists\delta_{\varepsilon}>0)(\forall x\in X)(|x - a| < \delta_{\varepsilon} \Rightarrow |f(x) - f(a)| < \varepsilon)
\end{align*}
At the given example, we have the function $f:\mathbb{R}\backslash\{1\}\to\mathbb{R}$, which is not defined at $x = 1$.
Hence it cannot be continuous at $x = 1$.
On the other hand, we have the following definition of limit in $\mathbb{R}$.
A function $f:X\to\mathbb{R}$ has limit at $a$, where $a$ is an accumulation point of $X$, and it equals $L\in\mathbb{R}$ iff
\begin{align*}
(\forall\varepsilon>0)(\exists\delta_{\varepsilon} > 0)(\forall x\in X)(0 < |x - a| < \delta_{\varepsilon} \Rightarrow |f(x) - L| < \varepsilon)
\end{align*}
As you can see, in the limit definition we do not require that $a$ is a point of $X$.
Precisely, we are interested in the behaviour of $f$ arbitrarily close to $a$, but not necessarily equal to $a$.
Therefore, as you have noticed, the proposed limit exists even though $f$ is not continuous.
That is because $1$ is an accumulation point of $f$, thus we can divide by $x - 1$.
Moreover, as @MilesB has noticed in the comments, $x = 1$ is a removable singularity.
So, if you define $f(1) = 1$, it becomes continuous.