American presidents have long sought God’s benediction in wartime and for soldiers heading into the fire of battle.