why would Christ command His disciples to buy swords in Luke 22:36-38?
No one buys a sword to serve a "utility" purpose outside of violence to defend oneself or attack another. Knives have additional uses outside of violence, but swords are utterly impractical for anything besides killing and hanging on a wall.
Although I have no problem with those who want to defend their homes by guns or whatnot, In my opinion Jesus words can not be used to defend this practice. I don't think that's what he is talking about.
In Luke 9 we see Jesus sending out the disciples to spread the kingdom of God, and he tells them not to take anything with them. The kingdom of God does not need food, or money or anything else to grow. But later Jesus needs to ensure that he is crucified as if he is a sinner. This symbolic action (similar to the actions of the prophets) will point toward the true meaning of his death. He is going to take the place of sinners. So at the last supper, what does he do to ensure that this will happen?
"And he said to them, 'When I sent you out with no moneybag or knapsack or sandals, did you lack anything?' They said, 'Nothing.' He said to them, 'But now let the one who has a moneybag take it, and likewise a knapsack. And let the one who has no sword sell his cloak and buy one. For I tell you that this Scripture must be fulfilled in me: "And he was numbered with the transgressors." For what is written about me has its fulfillment.' And they said, 'Look, Lord, here are two swords.” And he said to them, “It is enough.'" (Luke 22:35-38).
Jesus reminds them that God's kingdom didn't need swords or any other earthly thing to spread, but now he must be numbered among the transgressors so that he might fulfill Isaiah 53. In this case, he plans to be numbered among those who try to bring in their kingdom by violence. Rome brought in their kingdom in this way. The Jews did it in the days of the Maccabees. Shortly after this the Jews would rebel against Rome and try to bring in the kingdom by the sword. And previous to this meal Jesus had prophesied this very thing would happen and it would end in utter failure for the nation.
So Jesus and the disciples take their swords and go off down to the garden. Jesus knows Judas is going to show up with soldiers. The soldiers show up to take the king of the kingdom off to be judged, and Peter, misunderstanding why Jesus asked them to bring swords thinks the Jesus wanted them to bring the swords for defense (as many seem to also mistakenly, in my opinion, believe) picks up his sword and swings. Christ yells at him "NO MORE OF THIS!" This is not why Christ wanted his group of disciples to be caught holding swords. No more of this. No more of Jews trying to win their kingdom by the very violence that Babylon and Greece and Rome won their kingdoms by. This kingdom would win by suffering and death. Jesus again explains why they have the swords. It is so he would be counted as a transgressor and put to death. He says to the soldiers:
“Have you come out
as against a robber, with swords and clubs?" (Luke 22:52-53).
The gospels define what this term which is translated "robber" means. Compare John 18:40 with Luke 23:19 and Mk 15:7 and we see that the word Jesus uses can mean insurrectionists. If I am remembering correctly, Josephus also uses this word to refer to Jewish insurrectionists against Rome: Those who try to bring in God's kingdom by the sword.
So then Jesus is dragged off to trial, eventually standing before Pilate, who asks him if he's a king. Jesus says, "My kingdom is not of this world... if it were, my servants would have been fighting to keep me from being handed over to you." (John 18:33-36). Remember, Peter and started to do this very thing and fight to defend his king as is the way of the kingdoms of this world, but Jesus stopped him. Jesus kingdom does not come or sustain or try to protect itself by the sword like Rome or the earthly Jewish nation.
Pilate offers the Jews the option of either having Barabbas or Jesus set free. Barabbas was, notice the sin again, "a robber" (Jn 18:40) meaning he was guilty of "insurrection and murder" (Lk 23:25, Mk 15:7). The people plead to have the insurrectionist freed and then Jesus dies as if he himself is an insurrectionist. "If you release this man, you are not Caesar’s friend. Everyone who makes himself a king opposes Caesar... We have no king but Caesar" (John 19:12-15). So Jesus ends up dying as if he had taken up the sword and fought against Rome to bring in the kingdom... he dies as a transgressor, the very reason he told the disciples to get swords. And as he walks to his death he tells the woman, "Don't weep for me, weep for you and your children!" A generation later this very nation would become the insurrectionists and be destroyed as they try to defend and bring in God's kingdom by the sword.
So we have Jesus saying the kingdom doesn't need earthly things, then telling the disciples to get swords because he must fulfill the prophesy that he will be counted as a transgressor, then he yells at Peter not to defend him–the king–by the sword, then he asks the soldiers if they have come out against him with swords and clubs as if he is an insurrectionist, then he tells Pilate his kingdom is not of this world or his disciples would have been fighting, then an insurrectionist is freed and Jesus dies instead.
To me, if my interpretation is correct, this means the passage about Jesus telling the disciples to get swords should not be used to defend taking up the sword. That is borrowing from Rome and the Jew's worldview, which is the very reason it seems that Jesus said it: so that they would appear as if they were insurrectionists.