See, I've got this long running idea that Yoda is always wrong. Yoda wanted Luke to hold off on fighting Vader, until Luke was ready to kill Vader. Yoda was wrong to want that waiting period.
By going to Bespin, Luke learned that Vader was his father. He saved his Sister, and was able to gather new allies for the struggle.
Had Luke not gone to Bespin, he would not have been able to separate Anikan Skywalker from Darth Vader. And being able to separate them was the key to the defeat of the Sith and the Unity of the Force.
So: Yoda was wrong. And Anikan's last words were basically to tell Luke that "you were right". Because Yoda was wrong.
Luke going to bespin had no impact at all on the fate of leia, Chewie, threepio or Han there. Lando was already determined to rescue them and bug out.
Luke getting his hand cut off was fortuitous though.
I have always focused on the fact that neither yoda nor obi-wan say Luke has to kill vader. They keep saying he has to "confront" or "face" him and Luke jumps to the conclusion that that means "kill". Of course, they also don't correct him when he says kill. I've always found that significant.