It's conditioning and how we are taught to think and approach life. What we believe we perceive, if most of what I think is negative, I will see the world around me in a negative, cynical way. That perpetuates a vicious circle that leaves the person chronically angry, sad, defeated etc.
Fortunately, we can consciously choose to restructure our thought processes. It takes work and it means accepting accountability, but I know from experience it can be done. I grew up around many "negative Nellies" and I tended to be that way myself until I finally got sick and tired of feeling drained, depressed and just "bad" all the time. I started reading a lot about psychology, various self-help and spiritual teachings and over time I restructured my thought patterns to align with who/what I wanted to be. I never looked back because feeling at peace and good about the world around me has led me to many opportunities and blessings I wouldn't have otherwise accepted or recognized. Optimism opens our eyes and hearts. Chronic pessimism imprisons and robs us of quality of life.
People do not give their minds enough credit - our thoughts do create our perception of reality. If people truly understood just how true that is, and how powerful the mind can be, they'd spend more time learning to work with their mind, rather than allowing it to control them unsupervised ;).