In physics, it is something related to removing divergences in bosonic string theory, I am not an expert in that. Here, however, is a fantastic article that shows how -1/12 is actually derived: https://medium.com/cantors-paradise/the-ramanujan-summation-... (spoiler: it is really easy and could be done by a high schooler).
That proof (and the more general statement) is not correct because it makes assumptions about infinite summation of divergent series that are not true.
There is a link between the sum of natural numbers -- namely, the analytic continuation of the Reimann Zeta function has Z(-1) = -1/12. But the Zeta function is only defined to equal the sum of inverse powers for Re(z) > 1. And under a specific definition of summation (Ramanujan summation) you can say that "the sum is equal to -1/12" but that isn't the same as normal summation.
Mathologer did a fairly in-depth video[1] into why this proof is wrong and what the actual link is between the infinite series and -1/12. The upshot is that even if you use more complicated definitions of summation, you cannot define sums of the kind 1+2+3+... to equal a finite number.
If you assume the infinite sum of 1+2+3+... converges to a finite number you can easily prove a contradictory statement using the same summation properties assumed by that proof. Namely:
But we "derived" in the original proof that S3 is equal to 1/2, which is a contradiction. (You could derive S3 is 1/2 from S but that's what the article does in reverse.)