I’d argue that 12 years of schooling does get people to play as a team, it’s just that the team is smaller and more local. If I grow up in a smallish town in South Dakota I will go to school with and know people who mostly look like me. I won’t meet someone from a big coastal city and get to learn their worldview and how it was shaped. I won’t (probably) experience what it feels like to be in a minority role (as in race, political belief, etc). I will, however, grow up with people and maintain longer relationships with them. I will vote and act in the interest of my community’s shared beliefs.
I also think there are other intangible benefits to conscripted service aside from exposing people to a wide diversity of their country. We were able to end the Vietnam war because we had a draft. We’ve been at war with terror for 19 years with no end in sight. Too few families are affected now and the nation doesn’t have the will to stop this forever war.
I do generally agree that socializing in the context of killing people is probably not ideal. That said, a very small part of the military actually kills people. The vast majority of the military is either in a support role, or do not find themselves in a situation where they actually need to kill someone. So, I want to discount your first paragraph a bit. That said, I support the idea of a 2 year mandatory service which unlocks benefits like tuition (university, trade, etc). I don’t think that service needs to only be military - I would happily revive the Civilian Conservation Corps, use the Peace Corps, etc to fulfill that service.