And not just when they are in office, but in retrospect. Look at George W Bush, suddenly people in general looking back almost fondly. Will Ferrell reprised him on SNL remarking about this, and then he goes, "No, I was really bad."
There were many (myself included) who had much disdain for Reagan. Shades of that era are similar to now in terms of polarization and adulation. But looking back now it seems more orderly, respectful. Even if you didn't agree with his policies, his intentions don't seem as bad as with crass politicians nowadays, and he had that stern fatherly aspect that we needed at the time.
And if Kennedy didn't get assasinated, he'd be known for what he was, a President who made loads of promises he didn't keep, a footnote, the guy before Nixon.
There are things Presidents are credited for or condemned for that really weren't their doing, just happened during their term. Or circumstances they were thrust in (like depressions or major wars) that gain them heroic status for getting us through them when simply all they did was sit in the Oval Office and smile for the camera.
It's all a matter of perspective, of attitude.