A Church which insisted that its members - or even its clergy - had to be spotless would be an empty Church, or else a dishonest Church." B. Quash, in Quash and Ward, eds, Heresies and How to Avoid Them. See pp. 81-90.In his book Grace and Necessity Rowan Williams makes the point (from Maritain) that artists who might be considered immoral make good art, breaking any perceived absolute nexus between the morality of the artist and the work of art itself. This is not to make art amoral, because the 'immoral' artist is in the "precarious" (p. 39) position where their self-focus spills over into their art, rendering it unattractive. The judgement here is whether the art is good art, and is not about the morality of the artist.
There is a parallel here with the sacraments of the church and its ministers who administer them. I'm thinking here of the modern day donatists. Unfortunately, donatism is alive and well in the Anglican Church. Donatism was a schismatic movement that cut the church in North Africa, and remained alive and well until the rise ond military victories of Islam. It was a movement of moralists (compounded by politics and economics). The Donatists were hard-liners, expecting a high level of discipline among its members, especially its clergy. They refused the sacraments of the catholic church, and went so far as not recognising the ordination of clergy ordained by bishops who were morally suspect. (In this case the immorality in particular was failure to stand up to persecution and receive martyrdom.) Ben Quash says that a key passage in the dispute between the schismatics and the catholics was the interpretation of the parable of the wheat and weeds. (Matt 13:30) In the Donatist schema the field is the world, for the catholics the field is the church. For the Donatists good and bad co-exist in he world, but not in the church. For the catholics good and bad co-exist in the church. (Anyway, notice that in the parable it is God who does the judging - that's the point of the parable. Rene Girard is good on this.) The catholic tradition, particularly through Augustine, is the tradition which 'won', although donatism was never entirely purged. The result of the catholic victory is what we recognise as authentically the gospel of grace and redemption: God is good to us, sending the rain and sun on the good and bad alike. The efficacy of the sacraments does not depend on the personal holiness of the minister. What is important is the goodness of God toward us. The minister acts as a member of the whole people of God, graced by the presence of Christ, who is, after all, the chief minister of the church's sacraments.
This is not to make sacramentality utterly amoral. I think Maritain's observation about the artist and art is helpful here. The self-focussed priest can be the minister of an efficacious sacrament. But that priest is in a precarious position. The danger is that while minimally efficacious, the sacramental expression will be unattractive, even tending toward repellent. Efficacious or not, this kind of sacramental practice will be less effective in the world because no one will come!
I recognise the orders of Sydney evangelicals and the hard catholic right of our church. It appears that some of them struggle to do so to other canonically ordained ministers within our church on the basis of personal morality of the priest or their ordaining bishop. I recognise the orders of Sydney evangelicals who hold to the bizarre heresy that while in being the Father and Son are equal, the Son is subordinate personally to the Father. (My summary of that bizarre 'doctrine commission (?)' report from the Diocese of Sydney a few years ago.) Too bad the donatists can't reciprocate.