Intuitively because derivatives are local operations. If two functions look locally the same then they should have the same derivative. We may assume without loss of generality that is some ball . Now, choose be be arbitrary, then choosing so small that we see that but we may also choose so small that (where is the difference qutotient at with increment ) we see then that choosing to be small enough we have that

Where we used the fact that how we chose we have that since they agree on . But, since was arbitrary, equality follows.