>>508917221 (OP)The SA was basically formed by former Freikorps members and leaders and more or less had their own ideology and their own loyalties. They worked with the nazis because the nazis were the only ones standing up to the communists.
The Freikorps had traditionally been in a political rivalry with the ruling prussian elite, and those prussian elite formed one of the other pillars of Nazi political power. Prussian militarists had lost their status and power with the revolution and they wanted it back.
Hitler used the Freikorps remnants to fight his battles for him when he had no legitimate power to call on actual military resources. But once he gained power the prussians could serve him openly and there was no need for an ideologically divergent radical militia who was directly at odds with the political power of his new military.
The freikrops were courted with promises of compromises once hitler took power but those compromises were fundamentally incompatible with the vastly more important promises made to other parts of the nazi power base, so as soon as they outlived their usefulness they were culled.
Was it the right thing to do? Probably not. Hitler was not known for being politically astute and had a habit of making unnecessary enemies.