"... maybe hypocrisy is a natural ingredient of an effective moral system." says Robert Wright.
Like we're all supposed to hold each other to a higher standard than we ourselves meet. This encourages others to hold us to a higher standard in turn, and so we all force each other to at least pretend to be moral.
Well, that's one way to look at it. Fake it until you make it, I suppose. It's also a recipe for alienation. But I guess someone might say alienation is a small price to pay.