There is no such thing as a secret sin. This one could have been a private matter, but was somehow bragged about. A little leaven leavens the whole lump. The whole body/church is affected by the sin of one. Make no mistake, this is not about everyone keeping the rules, it is about the spiritual integrity at the heart of a congregation.
For the sake of the church, put away the sinner. He's injurious to the whole. And, for HIS sake, let Satan take him down so that he will ultimately be saved. The good of the individual and the whole are the same when it comes to hating sin.
The church should not be the most accepting place on earth if that means they lead the way in making sin acceptable.