Human beings have a very deep need to feel superior to others. You don't have to look far to find examples of this -- you see it in the church all the time, unfortunately. We've talked in this thread about churches that get too political, churches that run afoul of science, etc. Those are real and problematic, but they're not typical of your ordinary congregation. What exists in every church though is a contingent of people who show up on Sunday so they can look down on those sinners over there.
Now I'm not saying that describes anybody in this thread, or that it describes the median church-goer, but we've all met people like that, and I'll bet our respective pastors spend a disproportionate amount of sermon-time talking specifically to that person. My favorite pastors have always been the ones who were quick to emphasize that we should totally see ourselves as characters in Bible stories. Specifically, we're the workers who were complaining about the other people getting a whole silver coin when they barely worked at all. We're the "good son" who gets pissed at his dad for throwing a big party for the deadbeat son. We're the people picking up rocks to stone the adulteress with. We're the Pharisees. We're the disciples when the disciples are being stupid, as they often are in the gospels. Seriously. All of those stories are addressed to us, the church-goers. We need that. "The church is here for sinners, and by sinners we mean those of you sitting here in the pews with us today" is a very powerful message, because it completely erases the distinction between "good people" and "bad people" that all of us naturally want to draw.
This is an elliptical way of saying that I think that in your way of putting it, it's not either-or but both-and. Jesus got in trouble in part because he was too compassionate toward prostitutes, tax collectors, and lepers, all of whom were super-unpopular back in first century Palestine. (Notably, Jesus never said that prostitution was fine -- prostitution is unambiguously condemned throughout the Bible, so this is a nice clean example of how we're supposed to treat sinners, which again includes all of us). I'm always taken aback when I encounter people who argue, as some have in this thread, that they want certain people to be condemned and reject the idea of forgiveness for certain sins, but we have to remember that that is a normal human emotion and we should work on that in our community before we worry too much about the non-believers.
On the other hand, I think it's pretty obvious that most people are telling the truth when they say that they find the church to judgey and too self-righteous. Most of us are Gen Xers. When we were growing up, it was Christian fundamentalists who were getting all upset about KISS (Kids in Satan's Service) and AC/DC (Anti-Christ Devil Cult) and Dungeons & Dragons and Halloween haunted houses and all sort of other stuff that made them look like fuddy-duddys. The more politically-inclined will point to Jerry Falwell and Pat Robertson as well. That's the cultural reference point for our generation. You and I weren't responsible for that, but we inherited the legacy. Our job is to not create a similar legacy that our grandchildren will have to explain away.