What is the point of taking an oath?

The operative word here is duress. If an armed bailiff is standing there, and I am compelled to swear an oath under penalty of contempt, that renders the oath meaningless and non-binding…

I hope I never have to explain to a judge that if an accused has ever disclosed to me any facts that might be incriminatory, he has done so under my implicit oath of secrecy, which, being voluntary, carried more weight than the sworn oath of my testimony, which is uttered under duress.

What if a witness said “For the record, this oath is not sworn under my free will”?