Indifference and hypocrisy between them keep orthodoxy alive ...Hypocrisy is consciously and deliberately saying something which you believe to be false or doing something you believe or feel is not right while maintaining a public demeanor of righteous indifference or neutral sanguinity.
-- Israel Zangwill (1906)
When you're smilin', when you're smilin'
The whole world smiles with you.
Yes, when you're laughin', when you're laughin'
The sun comes shinin' through.
But when you're cryin', you bring on the rain
So stop your sighin', be happy again.
Keep on smilin', 'cause when you're smilin',
The whole world smiles with you.
If what you say is a statement, e.g. "I have returned your book to the library," when in fact you haven't, then it would be commonly called a lie. But if your statement is intended to have some sort of moral force or focusses on an act which you would reluctantly, at best, perform yourself, then it would also be considered hypocrisy, e.g. "Stop your sighing', be happy again."
Hypocrisy is generally considered undesirable, especially, in theorizing (moralizing?) if possibly mitigating circumstances are not considered. However, there are many situations which arise where disregarding concerns for hypocrisy is reasonable. Human history abounds with examples.
Two common social situations follow: the first is when a person of less power is dealing with someone threatening. For example, when importuned by persons (whether true believers or hypocrites) who are authorized, capable and willing to cause you hurt or harm. Such situations can be a matter of life, death or imprisonment.
Situation I examples. Austrian Lutherans, for example, when offered the options by Holy Roman Emperor Ferdinand II (1623-1637) of emigration, death, or conversion to Roman Catholicism, pretended to convert.
The Russian Communist Party membership purge under Stalin 1929-1930 resulted in the execution of over 3,000 people and tens of thousands who lost their positions and privileges for either former membership or sympathy with those who resisted Bolshevik dominance. The "Great Purge" of 1937-39 resulted in the deaths of from 600 thousand to over one million Communist Party and government officials, and wealthy landlords. We can imagine that the victims would have felt no pricks of conscience at vehemently, though hypocritically declaring their loyalty to the Party.
German resistance to Nazism was generally unable to mobilize political opposition that would lead to a coup against Hitler. However, 77,000 German citizen resisters, presumably non-Jewish, were killed by Special Courts, or People's Courts. "Tens of thousands" more were said to be sent to concentration camps.
During the years 1947 - 1954 many Americans were pressured by US government officials and police as to whether they were communists or communist sympathizers. Rumors abounded and jail was not an unlikely outcome for many. In order to be eligible for employment as a substitute teacher in 1965, I, myself, at age 22 had to sign a document attesting to the fact that I was not, nor ever had been, a member of or sympathizer with the Communist Party of America.
I signed easily since, having had little political experience at my age, my declarations were true. If they had been false, I would have signed anyway, since I badly needed a job and I considered such documents to be irredeemably stupid and counter-productive. It seemed to me that anyone who was actually a Communist would sign it, anyway; rather than draw back and say "Sorry, I can't sign this oath for reasons of conscience." Back then in 1965, such a declaration, divulged as a lie, might just get you, not a job, but a prison sentence.
Situation II, where hypocrisy is a matter of course, occurs with a tactful inquiry, "How are you?" where the conversants lack sufficient intimacy to reveal the truth. Tact is hardly even imaginable as being other than a virtue except, say, when a normally tactful, if rather informal, question is severely out of place. For example, upon being presented to the Queen of England to receive the CBE, one extends one's hand and asks, "How's it goin', Toots?" Whatever fault we might find with this, it is not likely to be that of hypocrisy.
The Values of Hypocrisy. If you are in a position of relative power or authority over some persons then your own hypocrisy (often reconceptualized as "leadership discretion") may facilitate any of the situations mentioned above: examples:
To reinforce the legitimacy of organizational or social status. [4A]
To maintain the hierarchy deriving from an ethos.
To intimidate persons of inferior status to forestall defiance or resistance.
As a procedural step in the initiation of military or academic recruit training.
To maintain a of veneer of respectability or sanguinity.
These are no small incentives for hypocrisy. Such hypocrisy, if at all held to be morally objectionable, is likely to be considered a "Lesser Evil" than the likely consequences of "Transparency".
James G. March (1976) suggests that we would be better off with less rationality. And that we would be well served by a concept of "sensible foolishness". Freed from the constraints of pre-existent purposes, the necessity of consistency and the primacy of rationality (formal or algorithmic approaches, e.g. policies, mathematical theories) often appear less salient. 
We could use the act of intelligent choice as a planned occasion for discovering new goals, unpredicted and attractive value consequences. We become intelligently foolish by treating goals as hypotheses, intuition as real, hypocrisy as a transition, memory as an enemy and experience as theory.
For a continuation on these issues, See March, J. G. & Olsen, J. P. (1976) Ambiguity and Choice. Bergen: Universitetsforlaget. Accessible at
Rationales for Intervention: From Test to Treatment to Policy: generalizing the Rationale.
 Zangwill, I (1896) Children of the Ghetto. A study of a peculiar people. New York: Macmillan and Co. page 510
 Written by Joe Goodwin, Larry Shay, Mark Fisher (1928). See, also B Ehrenreich (2009)Smile or Die ISBN:9781847081735
 See Hurt, Harm & Safety
 See Good Lies, Wise Evasions
[4A] See Merchandizing Science (...or Religion? ...or Politics?)
 See Constricting Social Ideals: breaking the values-action link to ensure "stability."
 See Good Lies, Wise Evasions
 See Teaching Values: basic lessons in hypocrisy?
 See Choosing The Lesser Evil: a Moral Failure?