What happens in those cases is that the majority vote to force everyone to defend the country. Its just easier that way since it means you wont be defending alone, if everyone defends together then its very unlikely the country will fall while if just volunteers does it then almost any country will fall.
Thinking you can defend a country just via volunteers is like thinking you can pay for a country just via charity, we vote to tax everyone for a reason. And people do that voluntarily afterwards, they are fine paying taxes as long as everyone is required to pay, same with defending the country.