Lando is introduced in The Empire Strikes back as an administrator of cloud city. Upon meeting him he comes off as a manipulative type individual who was formerly friends with Han. Once the visitors find out that he had been held hostage by the empire his entire narrative is switched around. Skipping to Return of the Jedi, Lando is one of the few rebels who sneak into the palace and try to free Han. Towards the end of the movie you can see how much of his dedication was switched to the rebellion cause. I don’t think the writers intended his character to feel in debt to Han for being frozen in carbonite, I believe the experience gave him a new purpose for the rest of the films.