My parents are 81 and 82 - and even with one having very significant health problems (and being very very upset about the state of the world), they are still happy, optimistic people.
I don't think it's anything they've done! I think it's really just who they are. My spouse makes fun that they think everything is "wonderful!" - he did not grow up with so much positivity and still finds it odd after a couple of decades.
It helps that both have good friends they spend time with, they travel (even with the serious mobility limitations), my mom is in a book club, my dad still does some work and golfs a lot.
I'm sorry you're going through this with your folks. Were they different when they were younger?