This question deals with why the derivative of $f$ is not defined at discontinuities in $f$. I found the answers satisfactory.
My question deals with why the derivative is not defined at discontinuities in itself. Take the following piecewise function:
$$f(x) = \begin{cases} g_1(x) & x < 1 \\ g_2(x) & x \ge 1 \end{cases} = \begin{cases} x^2 & x < 1 \\ x & x \ge 1 \end{cases}$$
This function is continuous, but its derivative is not. The function $g_2(x)$ has a derivative at $x = 1$, yet continuously gluing it with $g_1(x)$ apparently removes this tangent. Why is $f'(1)$ undefined instead of $f'(1) = 1$?