The set-up to this is going to take forever. If you don't like reading through sources of inspiration, skip down past all the quotes. Also, there are links to the pit of timesuck from which you will never fully emerge that is TV Tropes.
Goodness has only once found a perfect incarnation in a human body and never will again, but evil can always find a home there. Human nature is not black and white but black and grey.— Graham Greene
There once was a lovely book series called Harry Potter. It inspired a piece of fanfiction called Harry Potter and the Methods of Rationality. Incidentally, I love it and that story is a continual source of inspiration to places I have yet to reach.
The following is a quote from chapter five of that story, followed by Hanlon's razor.
Harry looked up at McGonagall and sighed. "I suppose there's no chance that if I said fundamental attribution error you'd have any idea what that meant."
McGonagall shook her head. "No, but please explain."
"Well..." Harry said, trying to figure out how to describe that particular bit of Muggle science. "Suppose you come into work and see your coworker kicking his desk. You think, 'what an angry person he must be'. Your coworker is thinking about how someone pushed him into a wall on the way to work and then shouted at him. Anyone would be angry at that, he thinks. When we look at others we see personality traits that explain their behavior, but when we look at ourselves we see circumstances that explain our behavior. People's stories make internal sense to them, from the inside, but we don't see people's histories trailing behind them in the air. We only see them in one situation, and we don't see what they would be like in a different situation. So the fundamental attribution error is that we explain by permanent, enduring traits what would be better explained by circumstance and context."
The interesting thing is, this makes sense. Though it may or may not be a conscious being thing--I lack the data set--pattern recognition is a human thing. It's why we can see faces in non photo-realistic drawings, or pictures in the clouds, or faces in people with significantly different faces, for that matter.*
Which means that optimistic people are going to continue assuming the best, if not forever, then even after a string of terrible things occurring, because that is the pattern they've picked up on. If they run into some people and peg them as cynics, their opinions are going to mean a little less, because their predictions do not fit the pattern.**
Let's name the optimist Ollie and the cynic Penelope.
Ollie believes everyone is good, an believes firmly in Hanlon's razor. Even if the person admits to doing some harmful act for no reason, Ollie believes that the person is genuinely good. At worst, to his mind, "evil" people are confused, ignorant, or a combination thereof.
Penelope is Ollie's opposite. If there is something wrong in the world, she believes that someone is at fault. No one is a saint. People can be truly evil, but not truly good.
Funny thing is, Penelope and Ollie agree, to some extent, all the time. Because, while they both believe that absolute evil or absolute goodness exist, all of their daily interaction is with morally gray people. Ollie sees lighter shades of gray, Penelope darker, but that's partially in what they believe "at fault" is. In Penelope's mind, choosing to remain ignorant is a morally questionable act.
And so there it is. The world, whitewashed and blackwashed.*** But not entirely that different. Because, in order to say someone is entirely the one or the other requires no moral ambiguity whatsoever.
And yet. Even in the absence of specific examples to point to note plural, you still get quotes like the one at the very top of this page, saying that evil not only exists, but exists as a matter of course and in its purest form, to the point of pattern.****
Little leap here: we do not see people, most of the time. If you spend just the right amount of time with someone, you see who they are at that moment without prejudices of who they were, and with enough experience to figure it out from given information. Enough to separate the prejudices we have from others, little enough to stop us getting prejudices from those we try to understand.
But most of the time we do not see people as they are, we see them as a part of a pattern. This makes sense. It is simpler to view changes than see the new person every day, and we are all of us creatures of pattern. It makes sense to view us as such.
But that means we learn to adjust for other's prejudices, regardless of whether we adjust for our own. I do not necessarily see that my views have started being incorrect, because I see every time my predictions were ever right. I only see when you said your predictions, so if we are both right and wrong about the same amount of the time, then A) I can justify why I am wrong, and B) if you are open with your predictions, then I see every time you are wrong. If I try to see this or that pattern, then I can probably find it, because you are wrong a certain amount of the time and I am right a certain amount of the time.*****
So if I see your pattern as being too optimistic, because you think there are instances of pure goodness, then I adjust down, and see your admission of dark gray as admission of black. If I see your pattern as too cynical, I adjust up--and your light gray becomes so bright as to shine.
I adjust, because I see the pattern in patterns.
Assuming all the above--I know it's a lot--belief in pure goodness or pure evil is based primarily on meta-patterning. I do not see any truly good or evil people personally; I only hear about people from outside, and then I adjust for the person telling me about the person.
So we believe in pure X, Y, or Q, not due to viewing it, but due to placing others patterns into our own. Which is a pretty cool thing to be able to incorporate, really. Infinite meta loop.
*By the way, just musing here, if we have this as a standard trait and managed to spread as far as we have because of it, that implies that patterns are common. So yes, change is the only constant, but there is a pattern to the world we know, and that pattern is patterns.
**Note: A person who would normally be cynical and is right several times is usually pegged as a realist, not a cynic. However! If the optimist is set enough in the positive pattern, negative assumptions may make someone a cynic regardless of success rate. The wording I used is meant to include both scenarios.
***I know it's not a word; it should be.
****Footnotes! I would have posted an inverse--that pure evil never found a home/only found one once and that since that human morality has been Gray And White, but I couldn't find one. Ones saying all humans were good deep down, yes. Ones saying more than one person has ever been entirely good, no. Post in the comments if you have one.
*****You can reverse everything in this paragraph--I'm wrong and you're right--and it still works.
I am fully aware that I admitted at the top of this post that I cannot know any of this. I did not feel like typing "I think" "I believe" and "in my opinion" 25 times.