Trotsky was unpopular in the party because of his inactiveness in increasing his popularity within the party. He couldn’t rely on the vote from other party members as he regularly offended leading Bolsheviks like Zinoviev and Kamenev. A series of arguments with them heightened by Trotsky’s ‘The Lessons of October’ resulted in the two triumvirate members allying Stalin and the rightists against Trotsky and having him removed from the post of War Commissar.
Trotsky maintaining his beliefs led to his unpopularity in the party. It also prevented him from using harsh measures in the party – he failed to use the Red Army and accepted the party’s decision. He also failed to compromise or heal arguments with Bolsheviks like Zinoviev who could have supported him as he put his beliefs over power due to his over-confidence. His maintenance of beliefs led to his statement of the opposition leaders criticizing the Politburo majority after Zinoviev’s removal, his demonstrations on the anniversary of the October revolution and his failure to accept the XV Congress’ decision which gave anyone with a Politburo majority the power to remove him from the party.
Stalin’s deviousness and cunning went unhindered as a result of Trotsky’s inactiveness. He deceived Trotsky about the date of Lenin’s funeral so Trotsky did not appear while appearing the biggest mourner, set up the Cult of Lenin and became associated with the deceased whenever possible to sway the public towards him. Stalin stayed out of the Zinoviev, Kamenev and Trotsky conflict to emerge as a candidate for succesion. His cunning led to and provided opportunities to succeed Lenin rather than Trotsky.
His single-minded ambition allowed Stalin to discredit other Bolshevik leaders. He was willing to compromise or sacrifice his beliefs for more power within the party, and suspended the common good for power by appointing allies rather than able in the Politburo. It allowed him to release the statement patronizing the three other contenders after their arguments. His compromise of beliefs enabled him to join the rightists’ Socialism in One Country against the left-wing Permanent Revolution to get rid of Trotsky. Stalin’s single-minded ambition allowed him to realize the opportunities to become the leader of the USSR.
Stalin’s exploitation of the party actually realized the opportunities. It was enabled by his position as General Secretary which he kept by surviving Lenin’s testament due to Trotsky’s unpopularity (Zinoviev and Kamenev defending Stalin). He used it to send to remote posts those who opposed him and appoint his supporters in powerful positions like the Politburo to achieve ultimate power. Stalin used this Politburo majority to have Trotsky, as a result of his maintenance of beliefs, removed from the Politburo and any real chance of succeeding Lenin. Stalin used his exploited position to remove Trotsky from the party and dominate the XV Congress which’s decision of removing all of Stalin’s opponents Trotsky could not accept for his beliefs, and have him exiled to Siberia with no power to succeed Lenin and Stalin with it all.
In conclusion, it was a combination of linked factors which resulted in Stalin rather than Trotsky succeeding Lenin. What Trotsky did to loose; Trotsky’s inactiveness, his unpopularity with the party caused by his maintenance of strong beliefs. And then what Stalin did to win; Stalin’s cunning, single-minded ambition and political exploitation which resulted in the order of events leading to the consequential expulsion of Trotsky from the party and exile to Siberia in 1927, which finally saw Stalin rather than Trotsky succeed Lenin as ruler of the USSR.