It’s useful to look at the gospels through the lens of redactional layers.
So for example a later editor may have wanted to include Matthew’s rebuke of using swords as is mentioned in Mark and was originally omitted in first draft Luke, and then the editor thought they needed to explain why they had swords in the first place by having Jesus at the last supper command them to immediately go out and buy swords.
Which is also missing in Marcion’s version of Luke.
It’s useful to look at the gospels through the lens of redactional layers.
So for example a later editor may have wanted to include Matthew’s rebuke of using swords as is mentioned in Mark and was originally omitted in first draft Luke, and then the editor thought they needed to explain why they had swords in the first place by having Jesus at the last supper command them to immediately go out and buy swords.