I came across this identity $$\left(x^2+7xy-9y^2\right)^3+\left(2x^2-5xy+12y^2\right)^3=\left(2x^2+10y^2\right)^3+\left(x^2-9xy-y^2\right)^3$$
Is there a deeper reason why a formula such as this should exist?
Is there some background where the search for it could be motivated, and that it would come naturally?
This is one of many Number Theoretic identities that mathematician Ramanujan discovered. It's hard to say exactly what the "deeper reason" such a formula exists, but it was most likely discovered in search of generalized families of Taxicab numbers. The formula shows a method to write a number as in two distinct ways as a sum of two separate cube numbers. For example: \begin{align*} 1729 &= 1^3 + 12^3 \\ &= 9^3 + 10^3 \\ 87539319 &= 167^3 + 436^3 \\ &= 228^3 + 423^3 \\ &= 255^3 + 414^3. \end{align*} (See if you can find which $x,\: y$, and $z$ you need to reach these solutions!)
As a few commentors have pointed out, Ramanujan claimed to have received many formulas like these from the goddess Namagiri, the Hindu Goddess of creativity. It's an interesting bit of mathematical history that I think you would be delighted to learn. Ramanujan was truly an incredible mind.