why do the religious take vows when Jesus said not to swear oaths and make promises?
Making a promise is not the same as swearing an oath (which Religious do not do). An oath (in this context) is sworn with respect to some other authority
But I tell you, Do not swear at all: either by heaven, for it is God’s throne; or by the earth, for it is his footstool; or by Jerusalem, for it is the city of the Great King. And do not swear by your head, for you cannot make even one hair white or black. Simply let your ‘Yes’ be ‘Yes,’ and your ‘No,’ ‘No’; anything beyond this comes from the evil one. [Matt. 5:34-7]
A promise (or vow) is asked of the candidate. S/he responds with his/her own yes or no. Nobody makes any promise on anything other than that.
This is, by the way, no different than an ordination, or wedding, or confirmation, or adult Baptism. A husband and wife make public promises (vows) at their wedding. They do not “swear oaths” in the context of this question. The vow they make to each other is no different (in principle) than the vow that Religious make to the Church.
In the Catena Aurea of St. Thomas, he quotes (among other Fathers) St. Augustine of Hippo on the passage in question:
[A]s to call God to witness is to swear, does not the Apostle break this commandment when he says several times to the Galatians, “The things which I write unto you, behold, before God, I lie not.” [Gal 1:20] So the Romans, “God is my witness, whom I serve in my spirit.” [Rom 1:9] Unless perhaps some one may say, it is no oath unless I use the form of swearing by some object; and that the Apostle did not swear in saying, “God is my witness.” It is ridiculous to make such a distinction; yet the Apostle has used even this form, “I die daily, by your boasting.” [1 Cor 15:31] …
[T]he Lord’s command [is] so universal, “Swear not at all,” that He would seem to have forbidden it even in writing. But since it would be an impiety to accuse Paul of having violated this precept, especially in his Epistles, we must understand the word “at all” as implying that, as far as lies in your power, you should not make a practice of swearing, nor aim at it as a good thing in which you should take delight.
[T]he Apostle is found to have used an oath in several places, that none might suppose that there is any direct sin in swearing what is true; but only that our weak hearts are better preserved from perjury by abstaining from all swearing whatever.
ok i think i sort of get it now. thanks