Etymology
Today it means: Used when admitting something one might otherwise lie about, e.g. to keep up appearances or be polite. Full definition →
Ellipsis of if the truth should be told.
Etymology from Wiktionary, CC BY-SA 4.0.