Is this logic behind the derivative of $x^x$ a coincidence? As many of you probably know, when you take the derivative of $x^x$, you cannot treat it as either a exponential function ($a^x$) or like a function of the form $x^a$. 

If you treat it like $x^a$ then you get an aswer of $xx^{x-1}$, which is just $x^x$.

Treat it like $a^x$, and you get $x^xln(x)$.

The correct derivative is $x^x(ln(x)+1)$, which you get by doing implicit differentiation after taking the natural log of both side.

This is the same as $x^xln(x)+x^x$, which happens to be the combination of the "wrong" derivatives you get when treating $x^x$ as the 2 different types of functions I specified earlier.

Is there any real logic behind this or is it coincidence. Also, could this also be applied to other function hybrids like $x^x$?
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.$$
Regarding "treating like $a^x$ versus $x^a$", the logic is that the $a^x$ rule applies when the base $a$ is constant, and the $x^a$ rule applies only when the exponent $a$ is constant, and so you simply do not apply those rules to $x^x$.

So what do you do? Implicit differentiation is not necessary. Instead, you should start from the very definition of exponentials:
$$y = x^x = e^{x \, \ln(x)}
$$
At this point, it becomes very clear and logical what you should do, namely apply first the chain rule then the product rule:
$$\frac{dy}{dx} = e^{x \, \ln(x)} \frac{d}{dx}(x \ \ln(x)) = e^{x \, \ln(x)} (1 \cdot \ln(x) + x \frac{1}{x}) = x^x (\ln(x) + 1)
$$