The text has always bothered me also... the 'best' explanation of the Y'fas to'ar story that I have seen over the years (wrt to a reasonable explanation of these actions of the tzadikim that went to war) is of the ohr hachaim hakadosh. ayin sham. mordechai cohen