I think that's something people have increasingly forgotten. My grandparents were active in their church for decades. They didn't talk about my grandmother's serious mental health struggles with the other parishioners.
People in the past had stronger community institutions, and I think a part of that was that nobody expected to bring their whole self to bowling club or the neighborhood potluck.
It's a balance though, isn't it? Like, sure, don't bring your whole self to every single bowling game, you're there to bowl so focus at the task at hand. Nobody is going to have a good time if every bowling game devolves into every little emotional issue anyone in the group is having.
But that doesn't mean those relationships originally started at the bowling club need to stay purely about bowling, a big part of community is to then open up when the context is right and when the other person is open to the sharing. It's how you grow your community, how you grow your circle. Don't expect every person in your bowling league wants to become your best friend ever, but it's also not healthy to assume that everyone there only ever wants to just bowl and only cares about bowling.
I've had a lot of people from work relationships that stayed purely work relationships. I've had some become friends. I've had several become important people in my life. If I forced myself to silo off work contacts are only ever work contacts, I don't think I'd be nearly as happy as I am today. I know I'd be a lot more lonely and probably a good bit less successful.
We talk about this huge loneliness epidemic and yet so many people are like "I would never talk to my fellow coworkers about anything personal, ever." Huh I wonder why we're so lonely. We're all convinced we shouldn't be personal with the people we spend a massive amount of our lives with.