The theme of Pirandello's short story is that there can be little justification to the horrific nature of war. At the time of Pirandello's writing, World War I had been waged by many countries in the name of many ideals. Nationalism, pride in one's country, upholding national traditions, expansion of one's country, and service to the greater good were all invoked by national leaders to justify the war enlistment. As the war increased in scope and depth, the body count did as well. Europe was left shattered in that so many were killed, wounded, abandoned, and orphaned. In the end, the old regimes and old methodologies that justified war were questioned as individuals felt betrayed and led astray. As Yeats writes, "Things fall apart/ the center cannot hold." While this was the case, Pirandello's story helps to capture this essence in a series of discussion points where people grasp faintly at the idea of trying to hold on to things and cling to what might be true, only to realize that there is no sanctuary or refuge for those who must deal with the harsh truth of war and its unending sense of loss.
This question has been asked and answered before. Here is a link...
The story’s major idea is that war is not an abstraction, but a destructive activity that affects people personally. The horror of war is death, regardless of how it is justified. It is more problematic to consider why the least appealing man is the one who has suffered the greatest loss of all those in the passenger car. Perhaps the idea is that the sacrifices of war are required for all, even the least attractive and appealing of the population, or especially for that group. This is a common theme among war stories that have an anti-war message.