The line “first they came for the communists” from Martin Niemöller’s famous poem, goes back longer than just the Nazis.
After the fall of the Kaiser the SPD started working together with ultra rightwing shock troops (Freikorps) to subdue communists, the broader left and the labor movement. Gustav Noske (SDP) literally called himself the bloodhound (bluthond).
Lookup the death of Rosa Luxemburg and Karl Liebknecht for more fun facts about the SDP in that era.
Calling it a democratic government is quite a short cut. They were in the middle of a revolution, in the process of deciding what the future of Germany would look like, no elections had taken place. In the population there was huge support for dismantling the Prussian military institutions, but the SPD decided to not only keep the military as is but also to use it against their political opposition. I’m not saying the Spartakusbund were the good guys, I’m saying that the excessive violence of the SPD was foreboding of what was to come.