As I have previously detailed elsewhere, In antiquity, divine names ortrue names were thought to hold power. This is best illustrated in an Egyptian myth about the god and goddess Ra and Isis. In this legend, Ra becomes injured, and Isis uses this fact as leverage to learn the divine name of Ra. Isis tells Ra that she can only heal him if she knows his secret name. Isis immediately cured Ra, but he could not take back the power that he had granted her by telling her his true name and from that point on Isis was equal to the sun god in power.
This can also be seen in spells and incantations. For example, on page 124 of Jewish Aramaic Curse texts from Late-Antique Mesopotamia by Dan Levene we see a spell in which the canter is instructed to use the name of Hadriel and Shakniel to silence "evil and violent people who stand gainst Berik-Yeheba son of Mama"
In the name of Hadriel, Shakniel, the well, the stone, and the pit, I adjure, I adjure you, in the name of he who is great and frightful, that you may silence from Berik-Yehaba son of Mama the mouth of all the people who write books, who sit in forts, who sit in market places and in streets, and who go out on the roads.
Another on page 46 seems to utilize as many names as possible as a power-enhancement tactic for the spell
I have adjured you by the holy angels, and by the name of Metatron the pure angel, Nidrel and Nuriel and Huriel and Sasgabiel and Hapkiel and Mehapkiel, shose seven angels that are going adn overturning the heavens and the earth and the stars and the zodiac signs and the moon and Plaedes. May you go and overturn evil sorceries and powerful magical acts...
At the same time, use of the divine name in Judaism was also forbidden. In Exodus 3:24, Moses attempts to learn God's divine name and is rebuffed and chided by a pithy response from God. As a result it is believed that God is not to be controlled and as such, we should never use the true name of God in speech or writing out of respect and reverence. However, this tradition does not appear until well after most of the Torah was authored and this therefore would not have been taboo at the time of the Patriarchs.
In terms of the OP's question, this brings into focus the commandment in Exodus
You shall not take the name of the Lord your God in vain, for the Lord will not hold guiltless anyone who takes his name in vain.
According to the Talmud, it was common for the name of God to be used to ensure the reliablity of a contract (which also appears to have extended to other gods in antiquity as well). The thought was that by contracting upon both a physical and divine penalty, it enhanced the value of the contract and helped to guarantee that fulfillment of the terms would be reliable lest the promisor incur the wrath of the divine. This practice seems to be similar to or related to the practice of scribes and pharisees that David mentioned
Should the Almighty choose not to curse, strike dead, etc. the promisor who breeched his contract, what would this say about the power of that God? It would not bear a very good witness to the promisee of the contract or anyone else who might be aware of the contract and breech of terms. And this is responsible for both the prohibition of taking the name of the LORD in vain and prohibition on breaking an oath, for the two were identical.
Jesus advice then was not just to avoid profaning the name of God, but also Israel, oneself and one's nation. Instead, Jesus advice was to be such a reputable individual with such integrity that the other party to a contract needn't even ask you to swear by anything. Jesus advice was to be so upstanding and have such an honorable reputation that other parties wouldn't even feel the need to ask you because you would be so implicitly trusted.
It is for this reason that many choose not to swear an oath in the name of God. However, the commandment in Exodus and Deuteronomy says not to take the name of the LORD in vain - not to refuse to take it at all. The passage in Matthew (5:33-37) should also be taken in context. As part of the Sermon on the Mount which notoriously makes extensive use of exaggeration and hyperbole. As such, many believe that like with lust where we do not literally carve our eyeballs out with the spoon for being tempted when we glance at the cover the Victoria's Secret catalog when we go to get the mail.
Similarly, some believe that we are able to uphold the spirit of the law instead of merely just the letter by taking an oath in the name of God and simply honoring it. Therefore, this is why other denominations believe that it is OK to continue to make oaths - because of they hyperbolic nature of the Sermon on the Mount combined with other places which seem to permit it and their intent not to break the oath.