What is the meaning of [what you don’t know can’t hurt you]

It is often better to remain in ignorance of things that could distress you.