Because the military had been ideologically purged of people who were explicitly anti-Hitler starting in 1932 when von Hindenburg appointed von Blomberg.
Much of the same command staff who existed as 1938 began were already in significant positions in 1932. Rather, what really happened is Hitler politically bought off the German military's loyalty, who already sympathized with his authoritarian and ultranationalist ideals even if they had suspicions of the more populist aspects of Nazis ideology, with the Night of the Long Knives and rearmament. Once established, that loyalty proved remarkably robust.
Blomberg was pro-Hitler until the Hossbach conference, but since he had been firing officers and soldiers who were anti-Hitler or even just not supportive enough when his turn came for purging he had eliminated pretty much anyone with the will to fight for him against Hitler.
Many of the appointments Blomberg made after the Hossbach Conference were done in attempts to get soldiers who were thought to be both willing and able to oppose Hitler's schemes in positions of power and were done in close consultation with other figures in senior positions who also opposed Hitler's scehemes, like Fritsch and Beck. The problem was they proved really bad at it, repeatedly misjudging how well Hitler had gained the rest of the military's support and hence the willingness and/or ability of these appointees to oppose Hitler. That's how Keitel (who outdid his predeceesor in terms of loyalty to Hitler) and Brautitsch (who proved unwilling to muster any opposition) got their positions (Geoffrey P. Megargee, "Inside Hitler's High Command," pg 34-42). After Blomberg and Fritsch were ultimately fired on trumped up charges, Beck all the way into the summer of 1938 when he made repeated presentations and direct appeals to other fellow officers, but while they never outright denounced him, they also refused to back him up and instead stated that Blomberg should work with Hitler's designs instead of opposing him because they did not believe Hitler's plans would result in the war Beck (quite correctly) feared they were. In the end, Beck was not purged: instead he resigned in the hopes of provoking others to follow him. Nobody did.
The army did not become supportive of Hitler because the anti-Hitler figures were purged in 1932. Really, what happened was that it was the other way around: the army became supportive of Hitler and thus assisted him in the purging of anti-Hitler figures in 1938.
Its a very similar reason to how the purges kept Stalin in power no matter how bad things got at the front IOTL.
Similar, yes. But not quite the same for the reasons I've highlighted above. Regardless, it doesn't really matter when it comes to the core point: by '41, Hitler's position is pretty well solidified and Barbarossa going even worse then OTL is a bit late to truly undermine it without serious consequences vis-à-vis the Eastern Front.