The Nazi party - or, the National Socialist Party of Deutschland(NSDAP) - had mixed origins in the beginning. It's not surprising as fascism itself, is a strange mix of nostalgic romanticisim and mysticism coupled with modern day political mobilization philosophies, ultra-rightwing political tactics and racism.
The Sturm Abteilung(SA), was a small reminder of the socialist element in Nazism - where the Nazis borrowed a lot of useful means of mass mobilization from the left such as political rallies, demonstrations, centralized party organization and etc etc.
The Sturm Abteilung was a para-military organization under the Nazi party, which was wildly loyal to Nazism and its leaders, and yet, dangerously hostile towards big business and capitalism, led by its Captain Ernst Rohem.
You have to understand that after WW1, Germany was in a mess. The Nazi party had not yet shown its incredible hostility towards anything communistic or socialistic. None of its "official" agendas we recognize today, had yet surfaced in early '30s.
It undermined the political base of the Social Democrats and Communists, appealing to the masses that the loss of WW1 and the economical ruin Germany lay in, was a result of the weak and failed policies of the left. The Nazi party, seemed like an ideal alternative - to the people it sounded a lot like social democratism which earned a lot of political support in Germany since the second half of the 19th century - and yet, it emphasized in values like wild patriotism, strong diplomatic policies, collective effort towards the renewal of the country and etc etc.
As mentioned, before Hitler's rise to power in 1933, Nazism had not yet "officialized" its internal policies, and the angry young men of Germany, were just as mad towards the corporates and rich people who survived unscathed from the war, as they were mad toward left-wing activists movements. The anti-capitalistic band of militant young men were gathered in the SA.
In 1934, one year after Hitler's election, in a brutal event known as the "Night of the Long Knives", the SA was purged with all of its major leaders slaughtered, including Ernst Rohem. Any element of socialism or communism that resided in Nazism was since that day, forever gone. The SA was reorganized into the SS after then.