My daughter asked me this question regarding this verse. I didn't particularly like the answer the commentary I was reading said so I put it to the scholars here why did he tell them to take a sword?

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."
(Luk 22:35-38 ESV)


Peter

If you believe what you like in the gospels, and reject what you don't like, it is not the gospel you believe, but yourself. Augustine of Hippo