Cause if you are yourself, especially being sad and depressed people will reject and avoid you. They see you as having some kind of infectious disease. So you fake happy to fit in.
This is a good answer, and I learned this the "hard" way. During my teenage years, I oftenly just didn't care about what society or the world around me thought and decided that if I felt sad, Idgaf, I want to show the world my "sadness". Only then did I learn that they world didn't give a shit, the people who (fake) concern, care, only did it out of pity, for their own agenda, or my favorite the religious proselytizers who treat the vulnerable (emotionally and physically, both) as some sort of 'project' they are working on. It absolutely infuriated me in my early 20's and only then did I decide to hide my pains, hide red flags, and then later decide that it was a me vs the world thing. I am absolutely alone in this world when it comes to topics of suicide, CTB, right to die, and no-one outside of this forum would empathize or give me time of day. This is why I am able to be fully myself here, but not IRL.