Some countries prefer peace and have been at peace for quite a while. Therefore, they may feel that they do not need a military because they have no intention of fighting. Also, some countries or nations are so small, that they may not feel like they can afford to support a military in their country. They may have to rely on their friendly allies to help them.
Some newer countries have not had time to get a military established since they just became a country. It takes sometimes years to get a military trained and weaponry purchased in order to have a strong military. Also, some countries have a different system in case they went to war. They may have a group of people ready to go to battle when the needs arise.