Sampras was tired. He'd done everything he wanted to do and from what I could tell as a fan the passion wasn't there anymore. Who can blame the guy. It's a grind to maintain the insanely high level that a top pro is at. He was 30 something and wanted to do some other things.
I agree that the game was still in his body. He could still win majors. But if the heart's not there even he wasn't good enough to make that happen. Kudos to him for leaving on his terms.
Fed, OTOH, seems to still just love the process. He loves playing. I think the other guys have caught up to his crazy high level, but that's not a knock on him. There are three people on this entire planet that can get on a tennis court with him and have an honest expectation that they might win. Everyone else is basically bracket filler, and these are some incredible players like Tsonga, Del Potro, etc. But to date, besides Del Potro once, they haven't gotten it done at a slam. The big four all got a slam last year, and Murray got the gold, Fed the silver, and Djokovic almost the bronze. Seems like we've reached parity, not a decline for Fed. By the time the semis of a slam happen, it's the same four guys for the most part.