Bows and swords: why bacteria carry short and long-range weapons