To be fair - mental illness doesn't always care about your social class. I have two friends - one with extreme anxiety and the other with on-off crippling depression - who have both had a horrific time allowing themselves help because they're relatively privileged white females who have nothing ostensibly wrong with their lives. They kept just saying, "I have everything right with my life, what do I have to be depressed/anxious about? If I go to therapy I'm taking that time away from someone who needs it."
I could not disagree with this more. People aren't doomed to be a product of their environment - that's really only what we say in retrospect about people who have gone that route.
There are millions of people every day who go through shitty circumstances and come out the other side totally functional - and you'd never know it because they aren't drowning their kids in the bathtub or shooting up movie theaters or whatever. See, for example,
this thread.
And there are millions of people who grow up incredibly privileged, and somehow, magically, manage to develop consciences and strong work ethics and use their wealth to support causes they believe in.
The environment you grew up in helps explain who you are as an adult. So do genes. They are less accurate in predicting the future than a weather forecast for ten days away.