What is the meaning of [Honesty is the best policy.]

It’s always better to be truthful and honest, even if the opposite may get you the benefits.

Example: I think you should just explain what happened, rather than trying to cover your tracks. Honesty is the best policy, after all.