You never know what's really going on in their head and all we have to go on are these quotes and their body language after losses and in pressers.
What's obvious is that they both have/had an insatiable desire to win. I feel Sampras could have went on for a couple more years as a solid top 10 player after that USO win, and may have done so had he not won that Final. But judging by these quotes, he made the best decision for himself. Fed on the other hand, seems to allow his enjoyment of the game to override his fear of failure and plays through the pain of losing more often than he's used to for the sake of Tennis.
Gotta respect Fed for that. This legacy business that everyone throws about, basically telling the guy to retire to save his legacy, is complete bullcrap salad.
I think Federer had just as much fear of losing as Pete did, until recently. When Pete retired his body was in bad shape and he was the Slam leader, with no active player close, so did not want to go through the pain of playing longer. Today, Roger has nothing to prove, so can enjoy the game more without winning slams. Also, Rafa is getting close to his slam count and Roger hopes to win another to make it harder for Rafa to catch him.