George Bernard Shaw wrote "Arms and the Man" to express his complete disagreement with any suggestion that war was useful in any way, for any reason. Shaw felt that military action was incorrectly perceived by the public as being romantic and noble and honorable; his play was meant to illustrate his arguments against this viewpoint.
Because Shaw felt most people considered war as a worthy cause in many circumstances, he felt most individuals would consider soldiers as being very brave and honorable persons. The quote you cite is part of Bluntschli's philosophy of soldiering, giving voice to Shaw's opinions.
"Soldiering, my dear madam, is the coward's art of attacking mercilessly when you are strong, and keeping out of harm's way when you are weak. That is the whole secret of successful fighting. Get your enemy at a disadvantage; and never, on any account, fight him on equal terms."
The nine out of ten soldiers who actually try to fight against their enemy with bullets or swords or other weapons are fools for endangering themselves, according to Shaw.