The Groener-Ebert pact is explained by Groener, writing in his 1957 autobiography:
“The collapse of the Kaiserreich deprived the officers of the basis of their existence, of their loyalties and sense of direction. They had to be given an aim… a sense of duty had to be awakened in them not only towards a particular political structure but towards Germany as a whole.
The officer corps could, however, only cooperate with a government which took up the fight against radicalism and Bolshevism. Ebert accepted this but was in grave danger of losing control and close to being overrun by the Independents and the Liebknecht group.
In the evening [November 10th] I phoned the Reich Chancellery and told Ebert that the army put itself at the disposal of the government, that in return the Field-Marshal and the officer corps expected the support of the government in the maintenance of order and discipline in the army. The officer corps expected the government to fight against Bolshevism and was ready for the struggle. Ebert accepted my offer of an alliance.
We [the High Command] hoped through our action to gain a share of the power in the new State for the army and the officer corps. If we succeeded, then we would have rescued into the new Germany the best and strongest element of old Prussia, despite the revolution.”