As it says in the title, I cannot find a good explanation for why Trotsky was exiled and not immediately killed. I know that Stalin did not have the complete control he would have years later and the purges had not begun, but it still seems a little weird that he was exiled to outside of the USSR, when not long thereafter all potential threats to the regime would be retired, murdered, or sent into exile from which there was no return? Was it because it was feared there was no way to keep him safely under lock and key in the USSR and Stalin could not yet kill him? And if the latter, why was Stalin able to assassinate Trotsky, or what changed his mind?
I'm sorry to get to this so late, but you answered your question in the second sentence. Let me break that out a bit, though:
Add to that the fact that Trotsky was not just a prominent Old Bolshevik, he was a chief negotiator during the USSR's efforts to extricate itself from WWI, the leader of the Red Army during the Russian Civil War, and a major political figure and Marxist theorist in his own right. To use an inexact analogy, it would be as if Ulysses S. Grant had ordered Abraham Lincoln murdered.
So what changed between his exile and assassination? A great deal--the purges, the destruction of the Old Bolsheviks, Stalin's suborning of the internal security forces to act as his own political enforcers, and so on. Stalin has Trotsky assassinated at the peak of his power, with the last remaining leaders of Trotsky's Left Opposition within the USSR suppressed and before the outbreak of Operation Barbarossa (the Nazi invasion of the USSR in June of 1941).
Edit: If you'd like to get a little more into the details of Stalin's rise, I heartily recommend Stephen Kotkin's biography. I've read the first two volumes and enjoyed them (inasmuch as one can) immensely. Not sure if volume three is out yet.