Churches are...imperfect. Even when Christianity first got started, you have references in the NT to churches that gave preference to the affluent, churches with false teachers, churches that had grown "lukewarm" in their devotion to Christ. Why should/would things be any different now, in the 21st century, post-Christian era?
Speaking as a stigmatized person (mental illness labels, etc.), churches have a lot of room for improvement. Around here, church is for respectable people, especially the mega-churches and mainline denominations. The poor, the ostracized...look elsewhere, please. I mean, its crazy. I get the distinct impression that I'm simply not welcome at the little PCUSA church I grew up in...and I'm not the only one.
Church is for people, and people are fallible. At best, church is where sinners saved by grace gather to learn and grow and build each other up. In reality, churches have feuds, split, shut down, get too big to disciple people, stray from sound doctrine, etc. Social issues--social class issues, race issues, etc.--play a big role in church politics. Where I live, only the Pentecostal and Catholic churches seem to have a good racial mix. The PCUSA church I grew up in is for well-educated white folks, for instance. Even the Catholic churches are divided, mostly by socioeconomic status. Here locally, there's an affluent Catholic church and a church for less affluent people, mostly black people and fairly recent Hispanic immigrants. I don't think that's terribly unusual.
Anyway....the social aspect of church *is* important. The problem is that people like to socialize with people who are like them, plus people bring all their "issues" to church with them.