crackhead_bob
Member
The whole movie is built around him and leads into the confrontation with Ren. It was no doubt planned to be his swan song well before filming started.
I also think that keeping Hamill out of most of the film was to give the writers creative breathing room so that they wouldn't have to worry about Luke and Han having to fight over screen time. It was probably a challenge trying to balance the introduction of the new cast while at the same time making Han Solo's role be more than a glorified cameo.
Force Awakens gave Ford his Gary Cooper moment, and now the writers can focus on Luke's character, and how he interacts with the new cast. I've got a feeling that he's going to be the Gandalf of this trilogy, and may even survive this as well, as opposed to being the slain mentor.