It is possible men may sometimes own rules of morality which in their private thoughts they do not believe to be true, only to keep themselves in reputation and esteem amongst those who are persuaded of their obligation.
 John Locke, An Essay Concerning Human Understanding (1689). copy citation

Context

“But it is impossible to conceive that a whole nation of men should all publicly reject and renounce what every one of them certainly and infallibly knew to be a law; for so they must who have it naturally imprinted on their minds. It is possible men may sometimes own rules of morality which in their private thoughts they do not believe to be true, only to keep themselves in reputation and esteem amongst those who are persuaded of their obligation. But it is not to be imagined that a whole society of men should publicly and professedly disown and cast off a rule which they could not in their own minds but be infallibly certain was a law; nor be ignorant that all men they should have to do with knew it to be such:” source