Ford did not want to play Han Solo anymore after The Empire Strikes Back, and wanted the character to be killed off. Lucas decided to freeze him in carbonite so he could be revived if Ford agreed to do the next movie.
#19 there was a lot more to it than that