Random fact: this only works if the series is finite. Otherwise you end up with sum(1...inf) equaling -1/12.
It's disingenuous to assert that is same as the sum of that infinite series without the associated caveats. By the definitions of infinite series that we all learned in calculus, that is a divergent series with no sum.
Edit: Wolfram Alpha[0] has a good graphic showing why this series converges to -1/12 (the one with the red line, drawing a peach-like shape). It also gives an intuition as to how complex numbers are influencing the results despite being omitted from the equation.
Yes, you can play a nice trick with that sum if you ignore the fact that inf-inf is meaningless.
The math involved in reaching this identity is akin to dividing by zero.