There are a lot of countries that have a significantly skewed distribution of income as well as a lack of opportunity, so that, the vast and overwhelming majority of the population has little or nothing, and with no real hope that this will change for the better. In that type of situation, it sure doesn't make much sense for those unfortunate people to thereupon take up arms to defend their own country against foreign or domestic enemies; yet, often times the people with virtually nothing of worth appear to willingly do so.
The most common reasons why citizens of a country that have nothing, will still fight, is that though they have very little, they still have obligations and responsibilities to their family, so for their sake, they will take up arms in the hope that by doing so that they will be able to provide for and to protect their family. Additionally, many nation-states utilize negative inducements to compel their people to take up arms, for, it not, the state, itself, will eradicate that individual or imprison them, so given the choice, between some small self determination and opportunity as opposed to absolutely no self determination, people will often take up arms for their country.
The thing though is that those that very little personal incentive to fight, often do not make good fighters, because obviously their heart is not in the battle, for they know in the big scheme of things, that they at the end of the day, won't really benefit from putting their life and limbs at risk, hence they have a strong tendency to do what little that they have to do that will not necessitate being subsequently punished by their own military authorities, and in battle, trying to avoid as much as possible, getting injured or killed.
In point of fact, those that literally have nothing to defend, because they own nothing, are going to go into battle with a diametrically different mindset as compared to those that most definitely have something to lose, and especially all those that have a lot to lose. In fact, the poor man sees battles and wars, as an opportunity to not so much make a name for themselves, but more as a chance to change their circumstances for the better, and to the extent that fighting hard will provide such, they will do so; and to the extent, that they believe that it won't, they won't.
All of this really means that those countries that have a governance which truly provides fair and equal opportunity in all salient areas of interest to all or nearly all of their citizens, is going to get the type of soldiers and citizens that will when called upon, fight hard for what they have, for they truly have something to fight hard for. On the other hand, all those countries, that keep their boots upon the necks of the vast majority of their populace, are essentially putting themselves in jeopardy of fighting two wars; one domestically and one externally, in which, when push comes to shove, those that nothing to defend, will as much as possible, do next to nothing, to help those that do.