Let us first take a look at the verses you mentioned that concern Jesus and his disciples buying weapons.
And He (Jesus Christ) said to them (his twelve disciples), "When I sent you (on training missions) without money bag, knapsack, and sandals, did you lack anything? . . . But now . . . he who has no sword, let him sell his garment and buy one . . . For the things concerning Me have an end."
So they (the disciples) said, "Lord, look, here are two swords." And He said to them, "It is enough" (Luke 22:35 - 38, NKJV).
It is difficult to imagine Jesus telling his disciples to buy weapons, considering that he would soon state the following.
". . . for all those who take up the sword shall perish by the sword" (Matthew 26:52, NASB).
Leaving for the mount
It was late in the day, and Jesus and his disciples would soon leave for the Mount of Olives. He had much to discuss with them before he would be taken prisoner, so there would be no time to go to the market, argue for the best value for their garments, and then haggle over the purchase of weapons.
It is interesting that no Strong's Concordance definition is listed for the noun "sword" in the KJV Bible translation of Luke 22:36. Bishop Pearce, according to Adam Clarke's Bible Commentary for the verse, believes the word has been inserted from what is said in verse 38, as it is evident Jesus never intended any resistance to his capture, nor to allow a weapon to be used on the occasion.
But in Luke 22:38 Strong's Concordance acknowledges the Greek word machaira (Strong's #G3162) is defined as a knife, dirk or sword.
If we back up to verse 35 of Luke 22 we hear Jesus reminding his disciples that he had sent them on a temporary journey with neither purse nor passports, nor shoes (see Matthew 10:5 - 10). When he asked if they lacked anything during the trip, they answered, "Nothing." Then Jesus stated the following.
Now, however, let the one who has a purse take it, and likewise his provision bag; and let the one who does not have a sword sell his garment and buy one (Luke 22:36, HBFV).
The disciples would need certain provisions, including a knife for preparation of food, cutting wood for fuel, and possibly to fend off robbers for which the area was noted. So, once Jesus' ordeal was over, they were to make sure each of them had a knife.
In Luke 22:38 the disciples said they had two swords, and Jesus said, "It is enough." In saying this he may have meant that it was all they would need, but Bible commentators Adam Clarke and John Gill believe he was saying, "We've talked about this enough." They are likely correct since, according to Luke's account, he then left for the Mount of Olives where his real agony would begin (Luke 22:39). Further discussion would be insignificant in comparison.