he had to die. some one had to die in the series. as far as main character goes, it was either him or R2 (since they're the harderst to write dialogue for).
That and the whole concept of either luke or han saving the day in the last chapter was ridiculous and is a major reason Bantam-Spectra lost the series.
All plots are run by lucas. if you read any of the press releases he actually had a hand in the final aproval of the story arc that is being used.
this isn't the good wins at the end. if you've continued to read on in the series chewies death is a major factor in han's life. it results in the crumbling of his marriage, his sinking to suicide/depression. in these books they're losing the war against the vong.