It is just like English sayings and phrases, there are Japanese sayings and phrases as well. It is called [kotowaza ことわざ].
Today’s kotowaza
嘘も方便 Uso mo houben
Uso – a lie
Houben – a way used to achieve something

Circumstances may justify a lie
Its meaning
It’s sometimes necessary to tell a lie in order to achieve the goal.
How to use it
「最近、髪がうすくなってきた。」と、お父さんが気にしていた。 「そんなことないよ。」と言ってあげたら、安心したのかニコニコしている。 嘘も方便だ。
「Saikin kamiga usuku natte kitaWatashi 」to oto san ga kini shiteita. 「sonna kot naiyo」to iltte agetara anshin shitanoka nikoniko shite iru. uso mo houben da.
「I have been losing my hair recently」my father said. So I said 「I do not think so」he seems to be relieved and is smiling.
My thought
Yes I agree, something it is necessary to tell a lie to make someone feel better or happy. No need to tell a truth which makes someone feel bad.

arigato