>it's important to realize that anyone who joins the military is ok with this set of rules.

There's a pile and a half of people who only join the military for a much higher payout of benefits for essentially unskilled work, or only so the military will pay to educate them into skilled work certification, or only because they made some mistakes and it's that or a felony charge (typically with jail time), and they're all typically just hoping to fly under the radar of such things until they get out with what they want going in rather than genuinely approving of the military doing to them the sorts of things the military does.

Obviously not all, but many of these also come out with majorly reoriented priorities. We can pass value judgements on the goodness of the imposed priorities all we want, but they're pretty irrelevant to and just distract from the phenomenon itself: "Indoctrination" is absolutely the correct word to use, so much we need very little, if any, additional description. The US military, and pretty much every military under the sun, uses an intense bout of classical stress conditioning to induce the sort of immediate, unquestioning dedication you've needed for hundreds of years in an effective infantry formation to teach boot camp recruits how to be in the mindset of just efficiently and stoicly doing their job as the brass designed you, the very small cog in the very large machine of a superpower-scale techno-mechanized combined arms war machine, to do it. In software, experimentation is king everywhere with a healthy outlook, because wastes of time give just finite losses of money while breakout successes are comparatively infinite in money gains, so most risks are worth it until they're clearly working or not working. In the military, when the rubber hits the road, other people are depending on you to do your job just as everyone expects it to go so they can integrate you into their job, which includes shooting and getting shot at somewhere down the net. Flying by the seat of your pants in such an environment could possibly get your fellows killed when things don't pan out and you fail to deliver, so the simple stations the vast majority of military members fill just don't really tolerate independent thought without going up several ranks of approval. The type of risk just isn't seen as acceptable in that context regardless of why you're taking it, even if it's specifically for the military's long-term interest. The philosophy is that the juice is never worth the squeeze in combat, and since we're a combat force on the label we'll spread that philosophy of "just do what the man with the fancier patch says" to every desk worker and wrench turner as well as trigger puller. And we'll spread it through the most irresistible teaching method we're still allowed to.

Sorry for that ramble, but it's really important to not deemphasize the absolute psychological impact classical conditioning in such an overwhelming social context can have. There's a reason they march you for miles at first when they almost don't care how fat you get once you've got an actual job. There's a reason Marine boot camp intentionally prevents you from sleeping just about whenever possible the first few days you show up while knowing resistance to sleep is impossible to train. There's a reason hazing underperformers is just about as old as history itself. It's because you can make anyone do anything if you just beat them enough, if you just stress them more than they've experienced before. Stress basically compels obedience, and obedience is very habit forming. Is there some selection bias like you describe in play today? Absolutely, but I don't think anyone familiar enough with the psychological phenomenon I'm not doing a great job describing would think much would change if it wasn't around. We've all read about Stockholm/Lima syndrome after all, where people with neutral or reverse sympathies fall just as easily, and it's essentially the same phenomenon. Enough stress turns everyone, even independent thinking people or bullheaded rebellious people, into receptive sponges.