In The Three Musketeers, the Three Musketeers and D'Artagnan salute Bicarat with their swords because, according to the text, “Bravery is always respected, even in an enemy.”
The context of this situation is important in understanding why they saluted and how they got to this point in the story. D’Artagnan and Athos were supposed to have a duel, but Athos’s shoulder was injured when D’Artagnan arrived to fight him. Since honor and chivalry play such a vital role within the story, D’Artagnan offers Athos some of his mother’s healing salve for his shoulder, which greatly impresses Athos.
Athos is part of the Three Musketeers, which also includes Athos’s two buddies Porthos and Aramis. They are “inseparable” and are actually called the Three Inseparables in the chapter. As D’Artagnan and Athos just begin to fight, the Cardinal’s guards show up; this is problematic because dueling was illegal. The Three Musketeers have a choice—yield and be arrested or fight the guards. There are five guards and only three of them—but then D’Artagnan volunteers to fight alongside the Musketeers.
A fight ensues, with the Three Musketeers (plus D’Artagnan) injuring or killing all of the guards; Bicarat is the last of the guards left standing. He wants to continue fighting, but the seriously injured Jussac (the commander of the guards) finally commands Bicarat to stop fighting. The Three Musketeers view Bicarat’s dedication to keep fighting as highly honorable, which is why they salute him.
Dumas, Alexandre. The Three Musketeers. George Routledge And Songs, 1878, pp. 40-41.