However, "for the last ten years" ALWAYS means "the ten years immediately preceding the time that the sentence is spoken" or "ten years preceding another time period that is specified" (e.g. "for the last ten years that he was able to walk")
In contrast, "for ten years" could mean any period of ten years. and without additional information, it is not clear which specific ten year period is being referred to.
The reason "for ten years" and "for the last ten years" have the same meaning is because of the verb tense "has been".
If a different verb tense is used, the two phrases could mean different things.
So...one could write
A1) "He WAS a stalwart of the park FOR THE LAST TEN YEARS.
B1) "He WAS a stalwart of the park FOR TEN YEARS."
In this case, (A) sounds a little awkward ("has been a stalwart of the park" would be better).
But... (A) means "the ten years preceding the time the sentence was spoken". In (B), you don't know which ten year period is being referred to.
Now , let's add some more information....
A2) "He WAS a stalwart of the park FOR THE LAST TWO YEARS of his high school studies.
B2) "He WAS a stalwart of the park FOR TWO YEARS before he went to university."
Here the two sentences mean mostly the same thing but only because of the extra information added to each sentence. If you change the extra information, you change the meaning of the sentence. NOTE: Already (B2) has some ambiguity whether the TWO YEARS are the two years immediately preceding university but the strong implication is that they are.