They are confirming that they are telling the TRUTH. Period.
That is a symbol of swearing to tell the truth. That's all. Is the truth good or evil? Doesn't matter.
Remember the same thing you have heard every time someone places their hand on a Bible in court? Do you solemnly swear to tell the TRUTH the whole TRUTH and nothing but the TRUTH, so help you God?
THAT'S IT. No one is promising a code of good behavior. Just spill what you saw or what you know about questions that are going to be asked of you. PERIOD.
No one is vowing to do good or evil when they place their hand on the Bible.
I would think most people got this down before they ever hit a courtroom.
James 5:12 "But above all, my brothers, do not swear, either by heaven or by earth or by any other oath, but let your “yes” be yes and your “no” be no, so that you may not fall under condemnation."
One shouldn't have to "swear" to tell the truth, they should just do it. It's not that hard. Anyone with a modicum self respect and integrity will tell the truth. Unfortunately, the political scene, Democrat or Republican, is a cesspool of lies, corruption, and deception. For many of the the politicians, swearing on the Bible to tell the truth and to uphold the Constitution is a joke and has been for years. The integrity and morals of the American people in general is on the decline. Does anyone know what the truth is anymore? The liberal mainstream media doesn't.
As impatience should not show itself in secret sighs, groans, murmurings, and repinings, so more especially it should not break forth in rash oaths, or in profane swearing; for of such sort of swearing, and of such oaths, is the apostle to be understood; otherwise an oath is very lawful, when taken in the fear and name of God, and made by the living God, and is used for the confirmation of anything of moment, and in order to put an end to strife; God himself, and the Lord Jesus Christ, and angels, and good men, are in Scripture sometimes represented as swearing: and that the apostle is so to be understood, appears from the form of swearing prohibited,
Definition of oath---a solemn appeal to a deity, or to some revered person or thing, to witness one's determination to speak the truth, to keep a promise, etc.
So it's meant to be ordered to good, but the specifics are in the words of the oath.
Before he enter on the Execution of his Office, he shall take the following Oath or Affirmation:—"I do solemnly swear (or affirm) that I will faithfully execute the Office of President of the United States, and will to the best of my ability, preserve, protect and defend the Constitution of the United States.