I can only speak for the US, but at least here it's largely not a question of intellect, but opportunity. If you're a teenager, not particularly academically inclined, in a community without a lot of hiring opportunities, the US military is the single best option you have for making a living wage. They'll feed you, house you, and pay you on top of that, all you have to do is sell your soul. That's a hard deal to turn down.
The people I don't trust are the ROTC lot. They had everything they needed to get into college, and then still decided their skillset was best applied committing atrocities. They're vastly more likely to be some jingoistic nut than the average highschool-to-bootcamp pipeliner.