Maybe it’s slightly-dishonest signaling—the soldiers prefer not to die far more strongly than they prefer that their country wins, but they claim otherwise because societies reward those who profess to share the society’s interests. Society also pays them for being soldiers, with money and social status. Joining the army is also a good costly signal of all-round fitness, resilience, political affiliation, etc.
Maybe it’s slightly-dishonest signaling—the soldiers prefer not to die far more strongly than they prefer that their country wins, but they claim otherwise because societies reward those who profess to share the society’s interests. Society also pays them for being soldiers, with money and social status. Joining the army is also a good costly signal of all-round fitness, resilience, political affiliation, etc.