“According to the Holy Quran, taking frivolous or false oaths is prohibited because it amounts to trivialising and disrespecting God.
“Furthermore, it is also forbidden to take oaths that hinder one from engaging in acts of virtue. For instance, when Hazrat Abu Bakr, may Allah be pleased with him, had sworn that he would not give alms or charity to a certain companion by the name of Mistahra [ibn Uthathah] in the future, the following verse was revealed:
وَلَا تَجْعَلُوْا اللّٰہَ عُرْضَۃً لِاَیْمَانِکُمْ اَنْ تَبَرُّوْا وَتَتَّقُوْا
“It means, ‘Refrain from such oaths that may hinder you from doing good deeds.’ [Surah al-Baqarah, Ch. 2: V. 225] […]
“In the exegesis by Mufti Abu Mas‘ud, the mufti of Rum, under the verse وَلَا تَجْعَلُوْا اللّٰہَ عُرْضَۃً لِاَیْمَانِکُمْ [‘And make not Allah a target for your oaths’], it is written that ‘عُرْضَۃً’ here refers to something that prevents or hinders the accomplishment of a task. It has been stated that this verse is in the context of [the incident of] Abu Bakr as-Siddiq, may Allah be pleased with him, when he had sworn not to give any alms to Mistahra, a companion, due to his involvement in the incident of the hadith of slander [hadith al-ifk].“Therefore, God Almighty in this verse commands not to take such oaths that prevent one from doing good deeds or righteous actions, or prevent the resolution of a disputed matter.”
(Al Hakam, 10 July 1904, p. 7)