>>And if it was for defense, why did Jesus within minutes disarm Peter, when he tried using the sword for defense?<<
Jesus explained that. He said: "Put the sword into the sheath; the cup which the Father has given Me, shall I not drink it?" He knew it was time.
Yes. But the two swords didn't get used to protect Stephen, or James, or any of the rest of the martyrs--- and their homes and families. There is no further use of the sword for defense in the Gospels or Acts or the Epistles.
Without exception, they did what Christ said: "Put down the sword" and "Take up the cross".