The identity does not always hold. Take for instance $m=n=2$ and $a=3$: the LHS becomes $2$ while the RHS is $1$. (There are a lot more counterexamples.)
However, if $\gcd(m,n)=1$, it will hold. Let $k=\text{ord}_{mn}(a)$, $x=\text{ord}_m(a)$ and $y=\text{ord}_n(a)$.
The relation
$$a^{\text{lcm}(x,y)}\equiv1\pmod{mn}$$
follows since $a^{\text{lcm}(x,y)}\equiv1\pmod {m\text{ and }n}$ and $\text{lcm}(m,n)=mn$. Hence $k\mid\text{lcm}(x,y)$.
As $a^k\equiv1\pmod m$ and $a^k\equiv1\pmod n$ we have $x,y\mid k$. Therefore $\text{lcm}(x,y)\mid k$.
Combining $k\mid\text{lcm}(x,y)$ and $\text{lcm}(x,y)\mid k$ we obtain $k=\text{lcm}(x,y)$.
Note: The condition $\gcd(m,n)=1$ is sufficient, but not necessary to make the equality hold. If $a=1$ the identity becomes trivial, for example. Some more interesting examples can be constructed using base-$a$ Wieferich primes. For example, $m=n=1093$ and $a=2$ will make the inequality hold. Both sides then equal $364$. Also $m=n=3511$ and $a=2$ will work.
In fact, the precise condition is the following:
If $p$ is a common prime divisor of $m$ and $n$ with $p^s\|m$ and $p^t\|n$, then $$\text{ord}_{p^{s+t}}(a)=\text{ord}_{p^{\max(s,t)}}(a).$$
In the special case $s=1$, $t=1$ this can be shown to be equivalent to $$p^2\mid a^{p-1}-1,$$
which makes $p$ a base-$a$ Wieferich prime.
I think in general, similar relations can be obtained as in the case $s=t=1$. I'll search for it, though I think this might be difficult.