Is this logic behind the derivative of $x^x$ a coincidence?

I think this is the answer you're looking for. Consider the function of two variables $$f(x,y) = x^y = e^{y\ln x}.$$ Then $$\frac{\partial f}{\partial x} = \left(\frac yx\right) x^y \quad\text{and}\quad \frac{\partial f}{\partial y}= (\ln x)x^y.$$ By the multivariable chain rule (setting $y=x$ in the second coordinate) $$\frac d{dx} f(x,x) = \frac{\partial f}{\partial x}\Big|_{(x,x)} + \frac{\partial f}{\partial y}\Big|_{(x,x)}\cdot 1 = \left(\frac xx + \ln x\right)x^y = (1+\ln x)x^y.$$


Let $F$ be a nice function of two variables, and define $$f(x)=F(x,x).$$ By the chain rule, $$f'(x)=F_1(x,x)+F_2(x,x)$$ where $F_1$ and $F_2$ are the partial derivatives of $F$ with respect to its two arguments.

Here, take $$F(x,y)=x^y.$$ Then $$F_1(x,y)=yx^{y-1}$$ and $$F_2(x,y)=(\ln x)x^y.$$ So $$f'(x)=xx^{x-1}+(\ln x)x^x=(1+\ln x)x^x$$ just as you observed.