Why are we allowed to cancel fractions in limits?

Simply because we are dealing with values $x\neq 1$ in this case, thus for algebraic rule we are allowed to cancel out

$$\lim_{x\to 1} \frac{x^4-1}{x-1}=\lim_{x\to 1} \frac{\color{red}{(x-1)}(x^3 + x^2 + x + 1)}{\color{red}{x-1}}$$

Remember indeed that by the definition of limit we are demanding that $$\forall \varepsilon>0 \quad \exists \delta>0 \quad \text{such that}\quad \color{green}{\forall x\neq1}\quad|x-1|<\delta \implies|f(x)-L|<\varepsilon$$

Note also that the same cancellation is used to prove the basic derivatives case, for example for $f(x)=x^2$

$$\lim_{x\to x_0}\frac{x^2-x_0^2}{x-x_0}=\lim_{x\to x_0}\frac{\color{red}{(x-x_0)}(x+x_0)}{\color{red}{x-x_0}}=\lim_{x\to x_0}(x+x_0)=2x_0$$


Proposition 1: If $f(x) = g(x)$ whenever $x\ne a,$ then $\lim\limits_{x\,\to\,a} f(x) = \lim\limits_{x\,\to\,a} g(x).$

Proposition 2: After the cancelation, the resulting function is continuous at $a,$ so the limit can be found by plugging in $a.$


You are correct. At the point $x=1$ the expression is undefined/behaves badly and has no value.

But limits aren't about functions at the point $x = 1$. They are about functions near the point $x = 1$. In fact, they are specifically about when $x \ne 1$ (but is close to $1$).

$\lim_{x\to a} f(x) = K$ means if $x$ is NEAR $a$ then $f(x)$ is NEAR $K$.

And if $x$ is near $a$ then $x$ isn't $a$ and it is perfectly fine to divide by $x -a$ when $x \ne a$.

Now your hackles should be raised when you hear something like "$\frac {x^4 -1}{x-1}$ is near $4$ when $x$ is near $1$" and ask yourself what can "near" possibly mean in precise mathematical terms.

That's a question for another time.