Just as the title says, why was the Schutzstaffel eventually favoured over the Sturmabteilung, as the foremost paramilitary arm of Nazi Germany?
The leader of the SA, Ernst Roehm, had been quite close with Hitler (both were early members of the DAP which later became the NSDAP..... what most people know of as the Nazi Party), possibly one of Hitler's only friends in his life (Hitler had allowed him to address him informally...... that's a big deal in German speaking countries).
Originally the NSDAP had been a socialist leaning party and they had put out a 25 point plan in 1920 with a lot of socialist aims in it. This was supposed to be the cornerstone of their policies/revolution and the SA (Roehm had been one of the founders of the SA and later its leader) used violence to spread the message of the NSDAP. However, after Hitler became Chancellor in 1933 he wanted to put a halt to the violence and the push for socialism as Hitler feared that after gaining some power it was time to reign in the violence for stability and over the years he'd moved further and further to the right in regards to politics. Roehm felt this was a betrayal and he kept the SA busy pushing for a socialist revolution in Germany.
Due to Rohem's disobedience it wasn't difficult for other NSDAP leaders, such as Himmler (Himmler was leader of the SS which was technically subordinate to the SA), to convince Hitler that Roehm was planning a coup. In July 1934 Hitler had many potential enemies, including Roehm, assassinated (Roehm was arrested and given the option to honourably commit suicide but refused and was then gunned down in his cell). With the SA now a suspect organisation it was placed under the leadership of the SS which was run by Himmler who had shown himself to be "loyal" during this crisis.
"Hitler" - Ian Kershaw
As important as the Night of the Long Knives was to the ascendancy of both Himmler and the SS within the nascent Third Reich, it was not necessarily a given that the SS would be the winner of this early round of purges. Both the SS and Himmler were nominally subordinate to the SA and Röhm until the aftermath of the 30 June and there were a number of individuals within the government who looked askance at the growth of the SS with the same disdain they held for the rowdy SA. Most notable among the latter was the Reichs Minister of Interior Wilhelm Frick, who as a trained jurist and fervent national socialist, who argued that the SS's various illegal methods were no longer necessary once the NSDAP had secured power. Such anti-SS sentiments also found resonance within the other corridors of power such as the military, whose generals increasingly butted heads with Himmler in the mid-1930s over the creation of armed SS units. While the Reichswehr chiefs countenanced the SS getting its hands dirty during the Röhm purge, it was more apprehensive about the SS becoming a permanent power bloc within the state.
That the SS and Himmler managed to avoid the fate that befell other instruments of political terror like Yezhov or Yagoda was in no small measure due to Himmler's own efforts in the early 1930s to remake the SS from a motley group of bodyguards into a hierarchically structured organization. To distinguish itself from the rowdy SA, Himmler began to style the SS as an elite, stable organization. This elite ethos not only entailed a more prominent public role, but also a stiff regulation of the SS's membership. The organization's "Engagement and Marriage Order" of 1931 sought to regulate the racial and political health of its members' marriages, and the vision of the SS man put forwards by Himmler was of a true family man. One of Himmler's chief deputies, Reinhard Heydrich, introduced various initiatives for mandatory physical fitness into his office. In these early years, the SS also began to recruit educated Germans, typically in their thirties. This generational aspect of the SS was important as many of these men were too young to have directly taken part in the First World War, but were old enough to be radicalized by German defeat and its aftermath. By the same token, the SS's youth-orientated recruitment appealed to Germans whose careers had either stalled or were blocked by traditional German patterns of promotion in the civil service which favored both seniority and class background.
But the elite ethos was only one strand of the SS's growing importance in the early 1930s. Himmler's decision to create the Sicherheitsdienst (Security Service/SD) in 1931 was of paramount importance to the SS's subsequent success in the 1930s struggles. The SD initially was not a very impressive organization; although it was an self-declared intelligence operation, other organs of the NSDAP had their own variations on intelligence gathering and ideological warfare. The SD's organization was quite small in 1931 and quite inexperienced in these matters. For example, Heydrich, whom Himmler promoted to head of the SD in mid-1932, largely only knew of police procedures from his voracious consumption of detective novels. But the SD proved quite adept at learning methods of surveillance and terror in the run-up to Hitler's seizure of power in 1933. More importantly, the SD's growth in power dovetailed with the NSDAP's own needs for an intelligence service. Although the SD butted heads with a number of NSDAP chiefs, it was becoming clear that the Party needed its own political intelligence organization, and the SD filled in this need.
The seeming professionalism of the SS abetted its image as a neutral power bloc within the highly radical National Socialist milieu. This reputation helped Himmler to take over the political police of the various Länder during the seizure of power. Many SA and SS groups had on their own initiative taken up responsibility for "protective custody" and proactively punishing political enemies of the new order. Much of this grassroots political violence was anathema to both the new NSDAP Länder heads, but also the existing police and civil service, many of whom saw chaos as counterproductive. Himmler was able to bank on the SS's elite reputation as a means to restore both order and to punish the enemies of the state. The establishment of Dachau in 1933 was emblematic of the process of the SS's approach to state terror. The seizure of power had led to a number of grassroots acts of political terror and the gunpowder factory at Dachau soon became a dumping ground for individuals placed under police detention. In this situation, the Gauleiter of Bavaria Adolf Wagner appointed Himmler acting head of the Munich police, which made him the de facto head of the Land's political police, a Weimar institution designed to fight individuals who sought to overthrow the Republic. Himmler immediately revamped Dachau into what would later become the model for later SS camps, with a hierarchical camp structure, SS guards, and a public symbol of "protective custody." Dachau soon became a legal limbo in which the laws of the Reich did not apply and soon it had a Janus-like face to the wider public. On one hand, the SS's stated elite ethos perpetuated an image that the camp was centrally-run and scientifically managed and the SS's propaganda emphasized that their camps were paragons of order. On the other hand, the legal null zone allowed the use of torture and other methods of violence, and Himmler allowed knowledge of this unsavory component of the camp to filter out into the public. A number of Bavaria's jurists were uncomfortable with Dachau's extralegal methods and in December 1933 Röhm and Himmler collaborated to torpedo a Bavarian state prosecutor's investigation of deaths in Dachau, but the SS's supposed professionalism gave the camp enough of a veneer to deflect these concerns.
Ironically, by posing as the solution to many of the problems its own agents caused, the SS was able become an arbiter in the internal power struggles of the nascent Third Reich. Göring's struggles with Frick over the status of the Prussian police, which as the largest Land carried with it outsized power, led to an alliance between Göring and Himmler. This alliance allowed Himmler to have an administrative bridgehead into the wider state apparatus, which allowed Himmler to make further inroads into other Länder along the lines of the model pioneered in Bavaria. SS recruitment, which had already grown in the run-up to power, swelled in this period as the SS amalgamated with preexisting state organs. With this growth in personnel and political power, the SS became one of the go to instruments for state terror and the elimination of political opponents.
This growth of the SS shows that it is not particularly useful to conceptualize the SA and SS as a dichotomy. Beneath their jackboots and paramilitary uniforms, the two organizations were traveling along very different trajectories from the 1930s onward. In stark contrast to its subordinate, the SA's ideological raison d'être was incoherent and its leadership did not actively court political allies like Himmler did. After 1933, Röhm largely rested on his own laurels and devoted more energy to increasing the strength of the SA, which by the Night of the Long Knives had approximately 4 million members with the takeover of other right-wing paramilitaries. This focus on building up the SA made Röhm both a latent threat, but also impotent as he could not effectively wield such a heterogeneous organization. The SS in contrast had a much clearer vision of the future laid out and its ethos did not pose a threat, at least in 1934, to the other power blocs in Germany. Thus the SS was frequently courted as an ally in the internal political struggles of the early 1930s, which allowed Himmler to further expand the SS's portfolio of responsibilities.
Sources
Gerwarth, Robert. Hitler's Hangman: The Life of Heydrich. New Haven: Yale University Press, 2011.
Longerich, Peter. Heinrich Himmler. Oxford: Oxford University Press, 2013.
Wachsmann, Nikolaus. KL: A History of the Nazi Concentration Camps. New York : Farrar, Straus and Giroux, 2015.
Wildt, Michael. An Uncompromising Generation: The Nazi Leadership of the Reich Security Main Office. Madison, Wis: University of Wisconsin Press, 2009.