Rejection of false oaths is a duty toward God. As Creator and Lord, God is the norm of all truth. Human speech is either in accord with or in opposition to God, who is Truth itself. When it is truthful and legitimate, an oath highlights the relationship of human speech with God's truth. A false oath calls on God to be witness to a lie. CCC 2151
It is forbidden because one calls upon God, who is truth itself, to be the witness to a lie.
“Do not swear, whether by the Creator or by any creature, except truthfully, of necessity and with reverence.” (Saint Ignatius of Loyola) (#448)
The Catechism Companion Vol III has some good commentary on this:
As Christians, we must not make false oaths. This emphasizes the seriousness of truth. We also must not use God's name to guarantee that we will perform an evil act (seeking revenge, for example)... In the Sermon on the Mount, Jesus tells us not to swear at all. We should let our answers be simply yes or no. St. Paul's letters clarify that there are valid reasons for taking oaths, and he even takes oaths himself (see 2 Cor 1:23)... By being called Christians, we are carrying Our Lord into this world. And so we have to be careful not only in how we speak but also in how we live and pray. (p. 74)
Finally, Fr. Kirby has a great video on keeping oaths and promises: