The root comment was connected to the topic, of course, but its off topic component has a stronger magnetic pull... that's the way these things grow.
- Enemy nations will be somewhat less motivated to invade if they know they will be facing a population that is entirely armed and ready to resist.
- Putting the population into the service of the country helps build a sense of national cohesion by giving a shared sense of mission and duty.
- Training the citizens to fight could also be a tool to help prevent dictatorships where the military persecutes the people; a military of citizen-soldiers would be less likely to see their own people as a "them" and more as an "us."
I work with some people in Armenia (which has mandatory conscription) - and from what I've observed that military service made the Us v. Them between Armenians and Azerbaijani stronger than perhaps it would have been without said military service (a drunken encounter between one of said Armenians and an Azerbaijani person outside of Armenia literally came to blows for no real reason I could observe except Us v. Them (well, and alcohol)).
edited: punctuation
I doubt it. Turkey has it yet there are plenty of problems between religious people and secular people, as well as between Kurds and other Turks.
The book Influence by Cialdini dives deep into some of the elements needed. Some takeaways that I remember:
Forcing people to be together in unpleasant circumstances, without a common goal they can work towards, does not reduce the us vs them mindset. His example was school, but anything "mandatory" would qualify.
If people are forced to be together, and they work together voluntarily to solve a problem (e.g. by one side needing the other side's skills), then you have reduced polarization.
The key with military is being forced to do something you hate alongside complete strangers with little opportunity to socialize outside of the group, under threat of court martial for leaving. And the group of strangers may change at any time. You really have to learn to get along, or work people you don't respect or hate.
Yeah, maybe that's better on the other side than inside though. Like if President Trump started a huge "Beat China" campaign all about making sure America stays the world hegemon, that could bring a lot of neighbors together even if it widens the gulf between me and someone on the other side of the world. It's hard to say.