I think it depends on the mental illness.
There's some sorts of mental illness that IS adaptive and people can pass themselves as not even ill despite the fact that there's plenty of traits which objectively would be considered unhealthy, its why people with low affective empathy and high cognitive empathy can rise rapidly to the top of corporations, the whole "snakes in suits" idea, sociopaths in business.
Also I'm absolutely convinced that through atrophy and entropy society has got that human essence and human existence do not pair up or pair off. So if you're really not able to forfeit very human needs to conform and fit in, you arent going to prosper and then those that prosper are a sort of self selecting and perpetuating elite. They manufacture norms, spread them, pass them on to the next generation. Sometimes people in crisis, people who're becoming unwell are just less denatured, more in touch with what it is to be human than what it is that's fashionable at the moment, some contexts and societies would drive anyone mad.
I do think that people who're already experiencing mental illness can be stigmatised, social exclusion is a thing, I think there's a lot of reasons for that. Its an invisible illness, diabetes and other examples exist too. Although sometimes I think visible illnesses, say people with mobility issues are stigmatised and tax peoples patience in ways they once didnt and shouldnt. The world is hardening its heart against disability and illness.
I think its got to do with a mutated work ethic, which doesnt even match reality, and also the so called optimisation or positive thinking movements, those things are already taking on bad characters. Sometimes anyone who is ill is a reminder of the reality and potentiality of illness that I think the majority fear and have worked to try and put out of their mind.