Taking the logarithm, the equation can be rewritten
$$\frac {\ln x}x=\frac {\ln y}y.$$
Let $f(x):=\dfrac{\ln x}x$. This function is not invertible, but can be split in two invertible sections, which are separated by a maximum, at
$$f'(x)=\frac1{x^2}-\frac{\ln x}{x^2}=0,$$ i.e. $x=e$. The is where $e$ appears. The complete graph of the curve is given by the two functions
$$y=f_<^{-1}\left(f(x)\right)=f_<^{-1}\left(\frac {\ln x}x\right)$$and $$y=f_>^{-1}\left(f(x)\right)=f_>^{-1}\left(\frac {\ln x}x\right)$$ where the subscripts denote the two branches.
Observe that
$$x<e\implies y=f_<^{-1}\left(\frac {\ln x}x\right)=x$$ and $$x>e\implies y=f_>^{-1}\left(\frac {\ln x}x\right)=x$$ and this corresponds to the linear part. The curvy part corresponds to the reversed inequalities.
Now you can undertand why the double point is found at $x=y=e$.
For a better understanding, let us consider a similar situation, starting from
$$x^2-2x=y^2-2y.$$
This time we can invert $f(x)=x^2-2x$, using
$$z=f(y)=y^2-2y\iff y=f_{</>}^{-1}(z)=1\pm\sqrt{1+z}.$$
From this, with $z=x^2-2x$,
$$y=1\pm\sqrt{x^2-2x+1}=1\pm(x-1).$$ we have the two straight lines $y=x$ and $y=2-x$. By intersection, the double point is $x=y=1$.
Notice that the maximum of $f(x)$ is achieved for $x=1$, where the two branches meet.