Let $f(x)$ be given by the integral
$$f(x)=\int_0^x \cos(1/t)\,dt$$
For $x\ne 0$, we see that $f'(x)=\cos(1/x)$. Hence, $\lim_{x\to0}f'(x)$ fails to exist.
But the fact that $\lim_{x\to0}f'(x)$ does not exist, does not imply that $f'(0)$ does not exist. In fact, we have
$$\begin{align}
f'(0)&=\lim_{x\to 0}\frac{f(x)-f(0)}{x}\\\\
&=\lim_{x\to0}\frac{\int_0^x \cos(1/t)\,dt}x\\\\
&=\lim_{x\to 0}\left(-x\sin(1/x)+\frac1x\int_0^x 2t\sin(1/t)\,dt\right)\\\\
&=\lim_{x\to 0}\left(-x\sin(1/x)+O(x)\right)\\\\
&=0
\end{align}$$
Hence, we see that $f(x)$ is differentiable for all $x$, but its derivative, $f'(x)$, is discontinuous at $0$.
The conditions to apply L'Hospital's Rule apply. We have $f(x)=\int_0^x \cos(1/t)\,dt$ and $g(x)=x$ are differentiable on open interval's containing $0$. But the limit
$$\lim_{x\to 0}\frac{f'(x)}{g'(x)}=\lim_{x\to0}\frac{\cos(1/x)}{1}$$
does not exist. Therefore, L'Hospital's Rule is a useless tool to determine $f'(0)$.
And that is all that is going on here.