Probably happened under obama's fundamental transformation. Remember the dems weeding out the Nat Guard to make sure there were no conservatives? Obviously the obama admin did the same with the FBI and we see how the upper levels of the military are. Leftists. The fundamental transformation was obamacare and turning these forces into gestapo/kgb.
They learned from places like Turkey; Turkey had maintained a secular pro-western society following the collapse of the Ottoman Empire after WWI. The key was the Turkish military; whenever the govt started becoming too much of a theocracy the military intervened and restored the more secular rule.
In my lifetime we just took for granted that Turkey was solidly pro western secular. We didn't notice that the present pro-Iranian govt was 'purifying' the military. Job accomplished! The U.S. Dems and 'friends' were not the only ones to notice the practice.