This happens because we do not know how dividing by 0 looks like and it is simply not defined. You may argue $\lim_{x \rightarrow 0} \frac{x}{x}$ is the same form as you stated. But that is untrue because in your case, we have the fraction a type of $\frac{\rightarrow 0}{exact \;0}$ which is as good as dividing 2 by 0, because in the end $\rightarrow 0$ is still a finite number, just infinitesimally small. And as you do not know what the result of dividing by 0 is, we cannot predict what exactly the outcome may be, imaginary, real or complex
Complex infinity is an infinite number in the complex plane whose complex argument is unknown or undefined– Andrei Nov 22 '23 at 15:33